-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Karma Unit Test Failures: Cannot find 'babel-plugin-instanbul' #1016
Comments
Was able to fix this issue by adding the following to my package.json (NOT included with aurelia-cli):
That got rid of my initial error. From there, I got the same error that was mentioned in #996 , and was able to fix it by adding this to my webpack.conf.js:
I'm not sure if that has any negative effect on a deployed app in the long-run. **Note, I did not end up needing "coverageIstanbulReporter" in my karma.conf.js in order to fix this issue. |
The webpack setup comes with both |
Thanks for the suggestion, that may be a good tool to look into in the future! I'm not quite sure the effort involved in converting an application from Karma to Jest without looking into it further, so I've been trying to stick with what we have for now because we have a large application with a high user base and over 1000 tests run through Karma, so if we can get away with as little changes as possible while upgrading everything, the better off we are. Luckily seems like those minimal changes I made got it working, hopefully a change will get merged into the next release of aurelia-cli now that I've provided reproducible steps to fix :) |
The cli generated webpack skeleton comes with both commands (au karma and au jest) by default. Try |
This should be fixed by reverting #970. https://github.com/huochunpeng/cli/commit/3c4d0d6bc8b61554a5fc29f57bd5468412123fb6 ☝️Can you try update your webpack.config.js and try |
I'm submitting a bug report
1.0.0-beta.9
Please tell us about your environment:
Operating System:
Windows 10
Node Version:
8.9.0
NPM Version:
6.5.0
Browser:
Chrome / All
Language:
ESNext
Loader/bundler:
Webpack
Current behavior:
Karma tests fail to run with the following error:
I found this issue: #996 and saw that the latest karma-webpack version is incorrect, so I installed "4.0.0-rc.3" as suggested. This did not fix the issue. I also noticed someone mentioned that the following would need to be added to karma.conf.js, but this also did not fix the issue:
Tests should successfully run
I'm trying to upgrade my aurelia project from webpack 3 to webpack 4, but since the aurelia skeleton isn't up to date, and the aurelia-cli is broken, I don't have a valid setup to reference.
The text was updated successfully, but these errors were encountered: