-
Notifications
You must be signed in to change notification settings - Fork 21
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
Mocking Component in Jest #51
Comments
No idea, you'll want to look for solutions for doing the same with the underlying library. This may help: https://stackoverflow.com/questions/46583986/how-can-i-ignore-svg-react-loader-path-to-my-svg-when-testing-with-jest-wi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do you mock these SVG components in Jest?
I import it in my files like suggested, but when it tries to retrieve it I get an error that the Module could not be found.
If I try the suggested Code Transform method from Jest allows the tests to pass, but I get an error because the import ends up being
<MyIcon.svg />
which is invalid syntax.Can we get some documentation on how to test components that use this plugin?
The text was updated successfully, but these errors were encountered: