angularjsbyexample icon indicating copy to clipboard operation
angularjsbyexample copied to clipboard

Chapter 7: Testing AngularJS

Open ghost opened this issue 8 years ago • 1 comments

Hello,

I am having an issue right out of the box with Karma. I have been receiving an error message regarding karma-ng-html2js-preprocessor. To be on the safe side, I have download the codebase and follow the instructions about karma, and bower. However, I am still receiving the error messages below, can you please advise?

`/Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/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/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/di/lib/injector.js:22:12) at Object.parent.get (/Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/di/lib/injector.js:9:13) at get (/Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/di/lib/injector.js:54:19) at /Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/karma/lib/server.js:143:20 at Array.forEach (native) at Server._start (/Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/karma/lib/server.js:142:21) at invoke (/Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/di/lib/injector.js:75:15) at Server.start (/Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/karma/lib/server.js:103:18) at Object.exports.run (/Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/karma/lib/cli.js:280:26) at requireCliAndRun (/usr/local/lib/node_modules/karma-cli/bin/karma:44:16) at /usr/local/lib/node_modules/karma-cli/bin/karma:54:12 at /usr/local/lib/node_modules/karma-cli/node_modules/resolve/lib/async.js:45:21 at ondir (/usr/local/lib/node_modules/karma-cli/node_modules/resolve/lib/async.js:188:31) at /usr/local/lib/node_modules/karma-cli/node_modules/resolve/lib/async.js:154:39 at onex (/usr/local/lib/node_modules/karma-cli/node_modules/resolve/lib/async.js:94:22) at /usr/local/lib/node_modules/karma-cli/node_modules/resolve/lib/async.js:25:18 `

ghost avatar Jan 31 '17 01:01 ghost

Hi @fabienthiombiano, Are the other unit test working? Also have you made sure that npm dependencies that you have installed match the version specified in the book. [email protected] [email protected] karma-jasmine@2_0 [email protected]

chandermani avatar Feb 14 '17 10:02 chandermani