Bonjour,
Je lis ces jours ci le cours concernant AngularJs et je suis bloqué au niveau du chapitre 2 section 'Les tests" voila j'ai effectué le test du code donné par défaut lors de l'installation d'AngularJs et ça a donné ça :
Après avoir effectuer la commande karma start !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 22 09 2017 16:09:40.731:WARN [karma]: No captured browser, open http://localhost:8080/ 22 09 2017 16:09:40.741:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:8080/ 22 09 2017 16:09:40.741:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency 22 09 2017 16:09:40.756:INFO [launcher]: Starting browser PhantomJS 22 09 2017 16:09:40.955:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket 3bGCHRzRTCnpWVDZAAAA with id 36899599 PhantomJS 2.1.1 (Linux 0.0.0) Controller: MainCtrl should attach a list of awesomeThings to the scope FAILED forEach@/home/spider17/workspace/first-app/bower_components/angular/angular.js:410:24 loadModules@/home/spider17/workspace/first-app/bower_components/angular/angular.js:4917:12 createInjector@/home/spider17/workspace/first-app/bower_components/angular/angular.js:4839:30 WorkFn@/home/spider17/workspace/first-app/bower_components/angular-mocks/angular-mocks.js:3172:60 loaded@http://localhost:8080/context.js:162:17 /home/spider17/workspace/first-app/bower_components/angular/angular.js:4958:53 TypeError: undefined is not an object (evaluating 'MainCtrl.awesomeThings') in spec/controllers/main.js (line 21) spec/controllers/main.js:21:20 loaded@http://localhost:8080/context.js:162:17 PhantomJS 2.1.1 (Linux 0.0.0): Executed 1 of 1 (1 FAILED) ERROR (0.045 secs / 0.01 secs)
Pouvez m'aider a trouvé pourquoi j'ai cette erreur ?
Cordialement.
Partager