I'm get the strangest error with NodeJS v0.10.11 and karma tests via grunt.
Initially, the tests would not run as PhantomJS did not start. After updating NodeJS, I get this :
[2013-06-19 03:16:12.743] [DEBUG] config - autoWatch set to false, because of singleRun
INFO [karma]: Karma server started at http://localhost:8080/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9 (Linux)]: Connected on socket id KVDuQs5niBzzc8KQSnFm
PhantomJS 1.9 (Linux): Executed 1 of 1 SUCCESS (0.327 secs / 0.041 secs)
ERROR [launcher]: Cannot start PhantomJS
Why is there an error after the tests have run successfully ?
UPDATE: Adding code
Gruntfile karma task:
karma: {
unit: {
configFile: 'karma.conf.js',
singleRun: true
},
e2e: {
configFile: 'karma-e2e.conf.js',
singleRun: true
}
}
karma.conf.js
// Karma configuration
// base path, that will be used to resolve files and exclude
basePath = '';
// list of files / patterns to load in the browser
// removed the following because of warning 'test/mock/**/*.js',
files = [
JASMINE,
JASMINE_ADAPTER,
'app/components/angular/angular.js',
'app/components/angular-mocks/angular-mocks.js',
'app/scripts/*.js',
'app/scripts/**/*.js',
'test/spec/**/*.js'
];
// list of files to exclude
exclude = [];
// test results reporter to use
// possible values: dots || progress || growl
reporters = ['progress'];
// web server port
port = 8080;
// cli runner port
runnerPort = 9100;
// enable / disable colors in the output (reporters and logs)
colors = true;
// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel = LOG_INFO;
// enable / disable watching file and executing tests whenever any file changes
autoWatch = false;
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers = ['PhantomJS'];
// If browser does not capture in given timeout [ms], kill it
captureTimeout = 5000;
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun = false;
Maybe something related to the issue with coverage or other preprocessor?
https://groups.google.com/forum/#!msg/karma-users/Oh-2Efbme9o/SJc0gFFdrZ4J
I don't have such problem on same NodeJS version on mac os x / red hat anyway.
ps - it supposed to be comment, not answer, but I don't have enough reputation for commenting :(