I am running Karma with Gulp, something like this:
gulp.start(`karma`);
And then:
module.exports = (gulp, plugins) =>
gulp.task('karma', done => {
plugins.util.log('Testing with Karma');
const server = new Server({
configFile: path.join(__dirname, '..', '..', 'config/karma.conf.js'),
singleRun: true
}, done);
server.start();
});
Karma is running and my tests are passing, but it will not stop (stack with the "success" message).
I read this issue, which seems exactly like my case, but it seems to be solved. I also run this example, which seems to be running ok. The only difference (as far as I can tell), is that I run the command using gulp.start
(I am writing a node module which should be running as a cli), and the example is running directly from package.json using gulp test
.
What am I doing wrong here?