Closed
Description
Describe the bug
I see the infamous Warning: You called act(async () => ...) without await.
after a fresh clone and install checking out the reactnavigation
example.
Expected behavior
No warnings. I thought react-native-testing-library
is supposed to wrap all async actions in act
already? I guess and use await
Steps to Reproduce
- Clone this repository:
git clone https://github.com/callstack/react-native-testing-library.git
- Move into the proper example:
cd react-native-testing-library/examples/reactnavigation
- Install packages:
npm install
(You neednpm install --legacy-peer-deps
if you are using a newer version of Node) - Run tests:
npm run test
- See warnings in test output:
console.error
Warning: You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);
Versions
npmPackages:
@testing-library/react-native: ^7.0.0-rc.0 => 7.2.0
react: ^16.13.1 => 16.14.0
react-native: ^0.62.2 => 0.62.3
react-test-renderer: ^16.13.1 => 16.14.0
Metadata
Metadata
Assignees
Labels
No labels