Closed
Description
react-testing-library
version: 6.0.0react
version: 16.8.3node
version: 10.13.0npm
(oryarn
) version: 6.4.1
If package.json contains
"^react": "<rootDir>/node_modules/react"
here:
"jest": {
"moduleNameMapper": {
"^react": "<rootDir>/node_modules/react",
}
then imports from react-testing-library
as
import { render } from 'react-testing-library'
will be undefined
. No error message will clue the problem. Debugging this problem takes a long time.
I don't know why this line of config was in this project and it doesn't seem needed now, yet some sort of error message would have saved hours of debugging. I imagine this or some other conflicting config was the issue here.
Metadata
Metadata
Assignees
Labels
No labels