nikku / karma-browserify

A fast Browserify integration for Karma that handles large projects with ease
MIT License
321 stars 49 forks source link

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

Closed chmanie closed 8 years ago

chmanie commented 8 years ago

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 8 years ago

Your Karma config looks alright to me. Try to use

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

to see what is going on.

chmanie commented 8 years ago

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 8 years ago

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 8 years ago

Possibly adressed via bfddfd4cd7accdfbcf5f6ff25219a12016818aa5, too.