javascript - Cannot find module 'ReactNative' from 'react-native.js' w/ Jest -
i'm attempting use jest (v20.0.0
) w/ react native application (v0.42.0
) when run yarn jest
following error:
yarn jest v0.27.5 $ jest fail __tests__/routing/router-test.js ● test suite failed run cannot find module 'reactnative' 'react-native.js' @ resolver.resolvemodule (node_modules/jest-resolve/build/index.js:179:17) @ object.<anonymous> (node_modules/react-native/libraries/react-native/react-native.js:188:25)
here jest
portion of package.json
"jest": { "testpathignorepatterns": [ "/node_modules/" ], "transformignorepatterns": [ "node_modules/(?!react-native|react-native-geocoding)/" ], "globals": { "__dev__": false }, "collectcoverage": false },
update #1
here's failing test file (i stripped out except import
, error persists).
import 'react-native'; import react 'react'; describe('router', () => { });
Comments
Post a Comment