Closed octohedron closed 7 years ago
this line was breaking it: global.__DEV__ = false;
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
My code is running fine in production but tests are not passing when importing an object from a file, error is:
TypeError: Cannot call a class as a function
atat _classCallCheck (node_modules/react-native/jest/mockComponent.js:9:616)
Object I'm importing:
import statement
const {Answers} = require('../../../test/setup').Fabric;
Commenting that line ^ makes the test pass
Just adding that import statement throws
Cannot call a class as a function at at _classCallCheck (node_modules/react-native/jest/mockComponent.js:9:616)
The same import statement works fine in other files, this error happens running jest -u --runInBand, doesn't happen when running the code in production.
The actual test:
What is the expected behavior?
Test should pass or tell me what the real problem is.
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
OS
macOS Sierra 10.12.2
npm -v3.10.8
node -vv6.7.0
jest^18.1.0