Closed
Description
react-testing-library
version: 6.0.0react
version: 15.4.1node
version: 8.11.3npm
(oryarn
) version: 1.12.3
Relevant code or config:
import 'react-testing-library/cleanup-after-each';
What you did:
Just imported the react-testing-library/cleanup-after-each
What happened:
Got this error Cannot find module 'react-dom/test-utils' from 'act-compat.js'
Reproduction:
Problem description:
The react-addons-test-utils
was moved to react-dom/test-utils
in the version 15.5
, that path doesn't work in react-dom <15.5
Suggested solution:
Import from react-addons-test-utils
or react-dom/lib/ReactTestUtils
for react-dom 15.4.x
versions, see this line
https://github.com/kentcdodds/react-testing-library/blob/master/src/act-compat.js#L3