Skip to content

fix: alignment RTL, STL #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/__tests__/rerender.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ test('rerender re-renders the element', async () => {

expect(getByTestId('number-display')).toHaveTextContent('1')

await rerender({number: 3})
rerender({props: {number: 3}})
expect(getByTestId('number-display')).toHaveTextContent('3')

await rerender({number: 5})
rerender({props: {number: 5}})
expect(getByTestId('number-display')).toHaveTextContent('5')

// Notice we don't remount a different instance
expect(getByTestId('instance-id')).toHaveTextContent('1')
expect(getByTestId('instance-id')).toHaveTextContent('3')
})

test('rerender works with composition API', async () => {
Expand All @@ -46,7 +45,7 @@ test('rerender works with composition API', async () => {

expect(getContent()).toHaveTextContent('Foo is: foo. Foobar is: foo-bar')

await rerender({foo: 'qux'})
rerender({props: {foo: 'qux'}})

expect(getContent()).toHaveTextContent('Foo is: qux. Foobar is: qux-bar')
})
5 changes: 4 additions & 1 deletion src/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ Check out the test examples on GitHub for further details.`)
unmount: () => wrapper.unmount(),
html: () => wrapper.html(),
emitted: name => wrapper.emitted(name),
rerender: props => wrapper.setProps(props),
rerender: options => {
cleanup()
render(Component, options)
},
...getQueriesForElement(baseElement),
}
}
Expand Down