Skip to content

asyncWrapper is not executed with act support #1302

Open
@lionskape

Description

@lionskape
  • @testing-library/react version: 14.2.2
  • Testing Framework and version: jest, 29.7
  • DOM Environment: "jest-environment-jsdom": "29.7.0"

Relevant code or config:

        const {user} = setup(<ControlDate onChange={jest.fn()} />);
        const input = screen.getByRole('textbox');
        await act(async () => {
            await user.type(input, '01.10.2015');
        });
        await act(async () => {
            await user.type(input, '02.12.2012');
        });

What you did:

I'm running events using user-events pacakge - https://github.com/testing-library/user-event

What happened:

Looks like it is executed in AsyncWrapper and make a lot of noise about "non-act environment".
testing-library/user-event#1200

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