Skip to content

Rerender stopped working on version 5.1.0 #369

Closed as not planned
Closed as not planned
@LuisaAPF

Description

@LuisaAPF

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()
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions