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 need npm 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
Describe the bug
I see the infamous
Warning: You called act(async () => ...) without await.after a fresh clone and install checking out thereactnavigationexample.Expected behavior
No warnings. I thought
react-native-testing-libraryis supposed to wrap all async actions inactalready? I guess and useawaitSteps to Reproduce
git clone https://github.com/callstack/react-native-testing-library.gitcd react-native-testing-library/examples/reactnavigationnpm install(You neednpm install --legacy-peer-depsif you are using a newer version of Node)npm run testVersions