Chrome runs tests twice in karma Chrome runs tests twice in karma google-chrome google-chrome

Chrome runs tests twice in karma


I know this is an old question but for me the problems was with reporters setting in karma config file.

I had:reporters: ['progress', 'dots', 'junit']

Running progress with dots caused the tests running twice (or rather showing it run twice).

So the solution was to leave out one of those reporters.


You might have your karma config wrong. It should know where your test files are but not include them:

files : ['js/*']

might need to change to:

files : ['js/*.js',         { pattern: 'tests/*.js', included: false }]

(This expects your source files to be under ./js/ and your tests to be under ./tests/

(I got this from [https://medium.com/@SchizoDuckie/so-your-karma-tests-run-twice-this-is-what-you-need-to-do-be74ce9f257e#.m3ci0m5vb] and it worked for me)


This happened to me simply because I had another Chrome tab open and pointing to the Karma server.