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
Metadata
Metadata
Assignees
Labels
No labels