jenniferabowd / jest_webpack_example

MIT License
63 stars 25 forks source link

jest not work #1

Closed chenbojian closed 6 years ago

chenbojian commented 6 years ago

jest

FAIL reactTests/tests/teamAmerica.test.js ● Test suite failed to run

Cannot find module 'react/lib/ReactComponentTreeHook' from 'ReactDebugTool.js'

  at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:179:17)
  at Object.<anonymous> (node_modules/react-test-renderer/lib/ReactDebugTool.js:16:30)

Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 1.106s Ran all test suites. npm ERR! Test failed. See above for more details.

jenniferabowd commented 6 years ago

@chenbojian Thank you so much for creating this issue ticket! I fixed the error. Turns out the issue was when I upgraded to React 16, I also needed to update my react-test-renderer. I found the solution to this here. Please let me know if you need any other help!