React-native v0.24, jest v12
FAIL src/foo-test.js
Runtime Error
Error: Cannot find module 'ErrorUtils' from 'env.js'
at Runtime._resolveNodeModule (/foo-project/node_modules/jest-cli/src/Runtime/Runtime.js:451:11)
at Object.<anonymous> (/foo-project/node_modules/react-native/jestSupport/env.js:22:28)
The error is from this line:
jest.setMock('ErrorUtils', require('ErrorUtils'));
Introduced by this commit in react-native: https://github.com/facebook/react-native/commit/b84ad2ab0da26d8285986a4519b2d824f520ce65
1+
Can you try adding this: https://github.com/fbsamples/f8app/blob/master/package.json#L51-L60 to your Jest config? That should work.
The docs in react-native about Jest testing are unfortunately entirely outdated and no one is bothering to update them :(
Closing as duplicate of #921.
Is this a yubikey?
which one version suites for that?
@cpojer