-
Notifications
You must be signed in to change notification settings - Fork 254
Error thrown when using react hooks #128
Copy link
Copy link
Closed
Description
Description
Given a react component using hooks
When a you attempt to use a user event e.g. type
Then you receive the error below
Warning: An update to %s inside a test was not wrapped in act(...).
Reason
As far as I understand this is because we are using the fireEvent from @testing-library/dom directly and not from @testing-library/react which means that it is not being in act.
Solution
A possible solution would be to allow for the user to provide a fireEvent implementation or allow for this to be configured in test setup
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels