-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed as not planned
Description
@testing-library/reactversion: 13.4.0- Testing Framework and version:
Jest 29 - DOM Environment: jsdom default version
Relevant code or config:
Codesandbox repro https://codesandbox.io/s/peaceful-violet-2bstp7
Working in React 17 codesandbox
https://codesandbox.io/s/affectionate-torvalds-vov885
What you did:
In a useEffect, dynamically import code, run it, then set state on the component. In React 17, we were able to test the results of the setState without an act warning. After upgrading to React 18, the act warning appears.
What happened:
Reproduction:
Codesandbox repro https://codesandbox.io/s/peaceful-violet-2bstp7
Working in React 17 codesandbox
https://codesandbox.io/s/affectionate-torvalds-vov885
Problem description:
Using findBy to wait for the resulting state (in the codesandbox, it's just some text to appear) should not be showing an act warning.
Metadata
Metadata
Assignees
Labels
No labels
