1

I have node 4.4.3 npm 3.8.6 protractor: 3.2.2 installed globally gulp 3.9.1 installed globally and locally with a link

package.json

"devDependencies": {
        "connect": "3.4.1",
        "gulp-load-plugins": "1.2.0",
        "gulp-protractor": "2.1.0",
        "serve-static": "1.10.2",
        "karma":"0.13.22",
        "karma-chrome-launcher": "0.2.3",
        "karma-jasmine": "0.3.8"
    }

gulpfile.js

var  Server = require('karma').Server;

gulp.task('test3', function (done) {
Server.start({
        configFile: __dirname + '/karma.conf.js'

    }, done);
});

when I run the task the only feedback i get is

[11:10:03] Starting 'test3'...

21 04 2016 11:10:04.008:WARN [karma]: No captured browser, open http://localhost:9876/

21 04 2016 11:10:04.016:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/

Then it waits forever

When I run the task the "old" way:

 var karma = require('karma').server;
    var karmaConf = require('./karma.conf.js')();
    karma.start(karmaConf, done);

It works fine

I do have a correctly configured karma.conf.js. Thanks

SteveLacy
  • 4,150
  • 2
  • 23
  • 30
Eric Soucy
  • 183
  • 1
  • 1
  • 6

1 Answers1

0

OK I found it my karma.conf.js was like this

module.exports = function () {
    return {...};
};

and I made changes to make it like this

module.exports = function (config) {
    config.set( { ....

this made it work

Eric Soucy
  • 183
  • 1
  • 1
  • 6