Skip to content
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 with jasmine throw error('No provider for "' + name + '"!') #178

Open
whisher opened this issue Oct 11, 2016 · 3 comments
Open

Karma with jasmine throw error('No provider for "' + name + '"!') #178

whisher opened this issue Oct 11, 2016 · 3 comments

Comments

@whisher
Copy link

whisher commented Oct 11, 2016

Hello there,
I'd like to use jasmine in my test suite
so I installed

npm install karma-jasmine --save-dev
npm install jasmine-core --save-dev

then

frameworks: ['jasmine'],

but when I run

npm test

I've got

node_modules/di/lib/injector.js:9
throw error('No provider for "' + name + '"!');

Can you help me, please ?
Thanks in advance.

@samithaf
Copy link
Contributor

I guess you only need karma-jasmine. did you try to run the tests without jasmine-core

@whisher
Copy link
Author

whisher commented Oct 12, 2016

Thanks Samitthaf for the kind and quick reply.
The jasmine-core is required but I worked it out
adding

require("karma-jasmine")

to the array plugins.
Thanks .

@samithaf
Copy link
Contributor

@whisher yup you need to tell karma what are plugins you need to use ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants