Use PhantomJS and enforce singleRun for tests.

Karma previously started a continuous server to allow for multiple
test runs, which would cause `npm test` to hang when tests finish.
This enables the config option `singleRun` so it quits after tests
have finished running.

Additionally, this removes Chrome and the Chrome launcher so tests
can be run properly in a headless environment.

Change-Id: Ib493d9cac3be5a83aa342b0f2a142f82a2757ffb
This commit is contained in:
Tim Buckley 2015-10-14 15:24:58 -06:00
parent 4680af36b3
commit 3ca729652c
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,6 @@
"karma": "~0.12.0",
"karma-babel-preprocessor": "^4.0.1",
"karma-browserify": "^4.0.0",
"karma-chrome-launcher": "0.1.8",
"karma-cli": "0.0.4",
"karma-coverage": "0.3.1",
"karma-jasmine": "^0.3.6",

View File

@ -12,10 +12,11 @@ module.exports = function(config) {
preprocessors: {
'app/js/**/*.js': ['browserify', 'babel', 'coverage']
},
browsers: ['Chrome'],
browsers: ['PhantomJS'],
reporters: ['progress', 'coverage'],
autoWatch: true,
singleRun: true,
browserify: {
debug: true,