-
-
Notifications
You must be signed in to change notification settings - Fork 44
An update to Test inside a test was not wrapped in act. With v5.0.1 #84
Comments
Hi thanks for the issue. I don't think it's related to #25, but it is probably related to testing-library/react-testing-library#535. We should stay subscribed to that issue here. Related, what version of React do you have installed? The reason I ask is that react native |
I'm using 16.9.0 of React. Just tried to update to react@latest and got 16.12.0. Looks like it didn't change anything for this error. |
This should fix it for you. The issue is not cleaning up the timeout.
|
Yes, it was this indeed, thank you very much! |
Uh oh!
There was an error while loading. Please reload this page.
Issue description
With the latest version of the library and with the latest RN I get the following error in the console:
There is more output in the console, but this is essential I think. Not sure if it is really related to #25
Also, test is marked as successful.
With @testing-library/react an equivalent test in a web app project causes no problems at all.
How to reproduce
npx react-native init TestApp
npm i --save-dev @testing-library/react-native
Create a
Test.test.js
inside of__tests__
with following content:Then
npm run test
Versions
react-native
orexpo
: react-nativenative-testing-library
version: 5.0.1jest-preset
: @testing-library/react-nativereact-native
version: 0.61.3node
version: v13.2.0The text was updated successfully, but these errors were encountered: