-
-
Notifications
You must be signed in to change notification settings - Fork 938
Cannot find module worker-loader!./pdf.worker.entry.js when using entry.webpack and Mocha #273
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
Comments
Okay, here's the deal. For Jest, you can use this solution. Regarding Mocha, I need to ask the community - is there a way to map module names so that they will be replaced on the fly in test environment, like in Jest? Alternative solution would be to ditch |
Any solution to this? I'm stuck with the failing test... |
@varand-pez Newest Jest uses jsdom 11.5.1 so you're quite a bit behind. Nonetheless, it should work fine provided that you don't use webpack-specific entry point AND either you're not rendering canvas or have canvas support enabled. |
I dont understand what the issue is. is it webpack? is it old version of jsdom? |
And just to try things I upgraded packages to the latest but still failing on the same exact issue.
|
Uh oh!
There was an error while loading. Please reload this page.
Testing
v4-beta.4
w/ Babel 7 w/ Mocha and this import:Crashes like so:
The workaround with
dist/no.worker
doesn't work anymore, because that file doesn't exist inbeta.4
and I haven't got worker-loader installed; is it required from now on? I can compile and run the app normally without installing it; only mocha has issues.The text was updated successfully, but these errors were encountered: