New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snapshot Test Import not working with babel-preset #1434
Comments
Can you try If that does not work please create a repo on github that I can npm install and npm test to troubleshoot. Tip: you don't need unmockedModulePathPatterns when using the react-native-preset because automocking will be disabled anyway. |
That didn't work for me. It seems like the issue is with importing the node_module Unfortunately, I can't create a repo at this time. But if it helps further here's what 'react.datacontainer' module looks like. https://github.com/ForceDotComLabs/react.force.datacontainer |
You can enable preprocessing for this module via this config option: http://facebook.github.io/jest/docs/tutorial-react-native.html#preprocessorignorepatterns-customization If you'd like, you can also create an issue on this project's github page to ask them to precompile their dependencies and publish build files on npm. |
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. |
I'm trying a simple snapshot test. The component I'm testing uses another component from a module. The test fails when trying to import this unmocked module with:
Failure
Test
SetupView Component
package.json
FYI, I have a .babelrc file in my root directory pointing to the react-native preset and the test runs but fails if I comment line 12 out since
DataContainer
is undefined.The text was updated successfully, but these errors were encountered: