Try translating your tests to PhantomJS.
Install PhantomJS Runner https://github.com/karma-runner/karma-phantomjs-launcher
$ npm install --save-dev karma-phantomjs-launcher
Modify your karma.conf.js to use PhantomJS
// /karma.conf.js module.exports = function (config) { config.set({ // ... plugins: [ // ... require('karma-phantomjs-launcher'), // ... ], // ... // browsers: ['Chrome'], browsers: ['PhantomJS'], phantomjsLauncher: { // Have phantomjs exit if a ResourceError is encountered // (useful if karma exits without killing phantom) exitOnResourceError: true // Could require proxy if tests access images without /base path }, //... }); };
You should now run your tests in PhantomJS instead of Chrome.
The default test script also starts the clock, so you can change your package.json script "test": "ng test --watch=false" as "test": "ng test --watch=false" . If you want to watch the clock for local development only start with ng test instead of npm test .
Morgan o'neal
source share