Strange error trying to run Jasmine specs
See original GitHub issuecallum:tool-test $ gulp test
[gulp] Using file /Users/madebymany/tool-test/gulpfile.js
[gulp] Working directory changed to /Users/madebymany/tool-test
[gulp] Running 'scripts'...
[gulp] Finished 'scripts' in 4.52 ms
[gulp] Running 'test'...
/Users/madebymany/tool-test/src/main.js
[gulp] Starting Karma server...
/Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/node_modules/di/lib/injector.js:9
throw error('No provider for "' + name + '"!');
^
Error: No provider for "framework:jasmine"! (Resolving: framework:jasmine)
at error (/Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/node_modules/di/lib/injector.js:22:68)
at Object.parent.get (/Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/node_modules/di/lib/injector.js:9:13)
at get (/Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/node_modules/di/lib/injector.js:54:19)
at /Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/lib/server.js:29:14
at Array.forEach (native)
at start (/Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/lib/server.js:28:21)
at invoke (/Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/node_modules/di/lib/injector.js:75:15)
at Object.exports.start (/Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/lib/server.js:272:12)
at Object.<anonymous> (/Users/madebymany/tool-test/node_modules/gulp-karma/lib/background.js:3:8)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
[gulp] Finished 'test' in 566 ms
I have tried reinstalling Karma and associated modules. Explicitly installing karma-jasmine
didn’t seem to work (http://stackoverflow.com/questions/19185548/no-provider-error-on-karma-serve-running-angularjs-phonecat-tutorial).
Issue Analytics
- State:
- Created 10 years ago
- Comments:24 (5 by maintainers)
Top Results From Across the Web
Underscore error when running karma + jasmine test
I have a strange error when running karma + jasmine tests over my js MarionetteJs app. ... This is just a dummy test...
Read more >Angular / Jasmine Tip: Getting at the Real Error Message ...
So if you find yourself wondering about why you're getting that strange XMLHttpRequest error, try running your test suite without source maps.
Read more >Frequently Asked Questions - Jasmine Documentation
The best Jasmine can do is associate the error with the spec or suite that was running when it happened. This is usually...
Read more >jasmine an error was thrown in afterall - You.com
afterAll is called when all of the specs have been completed, but it your situation server is not running and as a result...
Read more >Diagnosing Random Angular Test Failures - WalkingRiver.com
Background. Angular + Jasmine + Karma. I am using Angular 10 in this specific project, writing unit tests with Jasmine, and running them...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same problem. Adding ‘karma-jasmine’, ‘karma-chrome-launcher’ in the plugins fixed it.
Yes removed global karma then installed karma-cli globally. thereafter i installed karma local to project and then runned karma.
Thanks