-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
What does "Error: Failed to get mock metadata" mean? #678
Comments
+1 |
May be related to #682 |
Ultimately my issue did boil down to #682 however, the patch doesn't help if the component you are testing imports other components. Super frustrating. |
Yeah, this one is super annoying. |
The error message will link to http://facebook.github.io/jest/docs/manual-mocks.html#content in 0.9.0. Some modules use meta programming and can't properly be mocked. The guide should have examples on how to work around it. Jest 0.9.0 also has better mocking capabilities, so this issue might go away for your modules. |
@cpojer can you explain more about what "some modules use meta programming" and the reason why they "can't properly be mocket" because right now I face a weird issue, where I get this error when trying to call genMockFromModule on a package built with Babel 7, preset-typescript - but it works if I build the package with Babel 6 and ts-loader. Do you have any idea, what the difference might be? |
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 having an error running Jest and would like to get you a simple test case slice as per your guidelines, but am having trouble reproducing it in anything other than my rather large spring boot project.
Could you fill me in on what the error means so that I can better go about reproducing it- or fixing it?
The text was updated successfully, but these errors were encountered: