The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

7936 (1) [Avatar] Offline
#1
I have cloned git angello project and installed karma accoring to Appendix A)

1) I had to install karma-ng-html2js-preprocessor

2) npm test

3) Whats wrong with 5 Testcases (out of 11)?

angular@angular-VirtualBox:~/git/angello$ npm test

> angello@0.0.0 test /home/angular/git/angello
> karma start --single-run --browsers Chrome client/tests/karma.conf.js

08 09 2015 14:46:39.216:INFO [karma]: Karma v0.13.9 server started at http://localhost:9876/
08 09 2015 14:46:39.222:INFO [launcher]: Starting browser Chrome
08 09 2015 14:46:42.428:INFO [Chrome 45.0.2454 (Linux 0.0.0)]: Connected on socket 4IiUfzL8cFzRX7D9AAAA with id 95627985
Chrome 45.0.2454 (Linux 0.0.0) Stories Model Should get all FAILED
Error: Unexpected request: GET /home/angular/git/angello/clientio.com/clients/1/stories/.json
No more request expected
at $httpBackend (/home/angular/git/angello/client/vendor/angular-mocks.js:1178:9)
at sendReq (/home/angular/git/angello/client/vendor/angular.js:7915:9)
at serverRequest (/home/angular/git/angello/client/vendor/angular.js:7655:16)
at wrappedCallback (/home/angular/git/angello/client/vendor/angular.js:11046:81)
at wrappedCallback (/home/angular/git/angello/client/vendor/angular.js:11046:81)
at /home/angular/git/angello/client/vendor/angular.js:11132:26
at Scope.$eval (/home/angular/git/angello/client/vendor/angular.js:12075:2smilie
at Scope.$digest (/home/angular/git/angello/client/vendor/angular.js:11903:31)
at Function.$httpBackend.flush (/home/angular/git/angello/client/vendor/angular-mocks.js:1436:16)
at Object.<anonymous> (/home/angular/git/angello/client/tests/specs/services/StoriesModel.spec.js:21:22)
Error: Declaration Location
at window.inject.angular.mock.inject (/home/angular/git/angello/client/vendor/angular-mocks.js:2129:25)
at Suite.<anonymous> (/home/angular/git/angello/client/tests/specs/services/StoriesModel.spec.js:12:26)
at /home/angular/git/angello/client/tests/specs/services/StoriesModel.spec.js:3:1
......
4 more similar errors
.....

Chrome 45.0.2454 (Linux 0.0.0): Executed 11 of 11 (5 FAILED) (0.792 secs / 0.675 secs)
Lukas Ruebbelke (107) [Avatar] Offline
#2
Thanks for pointing this out. Looking into it now and will let you know what I find.
Lukas Ruebbelke (107) [Avatar] Offline
#3
And fixed... pull latest. The endpoint was changed and the tests never got updated so the $httpBackend mock was not getting called properly.

#highFive