nikku/karma-browserify

It doesn't run tests when using karma run and autoWatch: false

Closed this issue · 4 comments

I've got a problem using this preprocessor in combination with karma run (autoWatch: false). When execute karma run (even with tests defined) I get this message:

Chrome 48.0.2564 (Mac OS X 10.11.3): Executed 0 of 0 ERROR (0.016 secs / 0 secs)

It works fine with autoWatch: true and also with autoWatch: false, without using this preprocessor at all. Can someone reproduce this or am I just doing something stupid?

This is my karma.conf.js:

https://gist.github.com/8fa64eea624e0e1d0838

nikku commented

Your Karma config looks alright to me. Try to use

    // see what is going on
    logLevel: 'LOG_DEBUG',

to see what is going on.

lib/x.js:

module.exports = {
  doStuff: function doStuff () {
    return 'foo';
  }
};

spec/test.js:

var assert = require('assert');
var x = require('../lib/x');

describe('tests', function () {
  it('does stuff', function () {
    var y = x.doStuff();

    assert.equal(y, 'foo');
  });
});

Debug logs:
https://gist.github.com/chmanie/9bef6b011ffa77f1a77e

nikku commented

I checked out the example (that is basically what you are doing, too) against the latest versions of Karma / chrome launcher plug-in.

Could not reproduce your issue on Linux. Could you check if the example works for you?

nikku commented

Possibly adressed via bfddfd4, too.