You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests that use rerender started failing after upgrading from 4.1.0 to 5.1.0. I understand the function behaviour changed recently, but this is not working for me:
it('should show MyComponent when show = true', async () => {
const { rerender } = render(MyComponent, {
props: {show: true}
})
expect(screen.queryByTestId('my_component')).toBeInTheDocument()
await rerender({props: {show: false}})
expect(screen.queryByTestId('my_component')).not.toBeInTheDocument()
})