babel-plugin-rewire
babel-plugin-rewire copied to clipboard
Incompatibility with babel-plugin-jest-hoist
/path/to/jest/setup.js: babel-plugin-jest-hoist: The module factory of `jest.mock()` is not allowed
to reference any out-of-scope variables.
Invalid variable access: _get__
Whitelisted objects: Array,..., setTimeout.
Note: This is a precaution to guard against uninitialized mock variables. If it is ensured that the
mock is required lazily, variable names prefixed with `mock` are permitted.
at invariant (node_modules/babel-plugin-jest-hoist/build/index.js:13:11)
babel-plugin-jest-hoists is included with the react native babel preset. Due to this bug I am unable to use babel-plugin-rewire with react native.
Did anyone find a solution to this issue?
Having the same issue.