Skip to content

Commit

Permalink
Make "npm test" run Karma tests
Browse files Browse the repository at this point in the history
Result is this:

```
$ npm test

> docker-registry-frontend@0.0.2 test /Users/marca/dev/git-repos/docker-registry-frontend_2
> karma start test/karma.conf.js

09 07 2016 13:17:02.420:WARN [watcher]: Pattern "/Users/marca/dev/git-repos/docker-registry-frontend_2/app/scripts/**/*.js" does not match any file.
09 07 2016 13:17:02.424:WARN [watcher]: Pattern "/Users/marca/dev/git-repos/docker-registry-frontend_2/test/mock/**/*.js" does not match any file.
09 07 2016 13:17:02.445:WARN [karma]: No captured browser, open http://localhost:8080/
09 07 2016 13:17:02.452:WARN [karma]: Port 8080 in use
09 07 2016 13:17:02.453:INFO [karma]: Karma v1.1.1 server started at http://localhost:8081/
09 07 2016 13:17:02.453:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
09 07 2016 13:17:02.483:INFO [launcher]: Starting browser PhantomJS
09 07 2016 13:17:02.979:INFO [PhantomJS 2.1.1 (Mac OS X 0.0.0)]: Connected on socket /#2jY2WSOiqKjEJUvUAAAA with id 51298400
PhantomJS 2.1.1 (Mac OS X 0.0.0) Controller: AboutCtrl should attach a list of awesomeThings to the scope FAILED
	forEach@bower_components/angular/angular.js:326:24
	loadModules@bower_components/angular/angular.js:4115:12
	createInjector@bower_components/angular/angular.js:4041:22
	workFn@bower_components/angular-mocks/angular-mocks.js:2464:60
	loaded@http://localhost:8081/context.js:151:17
	bower_components/angular/angular.js:4155:53
	TypeError: undefined is not an object (evaluating 'scope.awesomeThings') in test/spec/controllers/about.js (line 20)
	test/spec/controllers/about.js:20:17
	loaded@http://localhost:8081/context.js:151:17
PhantomJS 2.1.1 (Mac OS X 0.0.0) Controller: MainCtrl should attach a list of awesomeThings to the scope FAILED
	forEach@bower_components/angular/angular.js:326:24
	loadModules@bower_components/angular/angular.js:4115:12
	createInjector@bower_components/angular/angular.js:4041:22
	workFn@bower_components/angular-mocks/angular-mocks.js:2464:60
	loaded@http://localhost:8081/context.js:151:17
	bower_components/angular/angular.js:4155:53
	TypeError: undefined is not an object (evaluating 'scope.awesomeThings') in test/spec/controllers/main.js (line 20)
	test/spec/controllers/main.js:20:17
	loaded@http://localhost:8081/context.js:151:17
PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 2 of 2 (2 FAILED) ERROR (0.004 secs / 0.01 secs)
```

Fixes #139
  • Loading branch information
msabramo committed Jul 9, 2016
1 parent d5dd87d commit fcd4218
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,24 @@
"grunt-svgmin": "^3.1.2",
"grunt-usemin": "^3.1.1",
"grunt-wiredep": "^2.0.0",
"jasmine": "^2.4.1",
"jasmine-core": "^2.4.1",
"jshint-stylish": "^2.1.0",
"karma": "^1.1.1",
"karma-jasmine": "^1.0.2",
"karma-phantomjs-launcher": "^1.0.1",
"load-grunt-tasks": "^3.4.0",
"time-grunt": "^1.3.0"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "grunt test"
"postinstall": "bower install",

"pretest": "npm install",
"test": "karma start test/karma.conf.js",
"test-single-run": "karma start test/karma.conf.js --single-run"
},
"description": "A pure web-based frontend to a docker-registry",
"main": "Gruntfile.js",
Expand Down

0 comments on commit fcd4218

Please sign in to comment.