-
Notifications
You must be signed in to change notification settings - Fork 19
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
[Webpack] File Loaders cause mocha to throw Syntax Error #1
Comments
Thanks for reporting the fix! I've added your text to the wiki, so hopefully people can find it if they need it. |
+1 Helped me solve what I thought was a fairly obscure issue. |
+1, saved my life |
Thanks for posting this, saved me! |
Update: There is now a package called ignore-styles which seems to accomplish the same goals and also may help with testability. |
+1 |
2 similar comments
+1 |
+1 |
Update the jest-integration tests for unexpected10.30
I went to integrate this test setup into my project which is built on Webpack. As such my
.js
files sometimes include files loaded with webpack loaders; for example.png
or.scss
. Mocha throws aSyntaxError
on encountering these, so you need a custom compiler.My custom compiler
src/tests/compiler.js
:And new
npm test
command:The text was updated successfully, but these errors were encountered: