How to use the karma.Server.start function in karma

To help you get started, we’ve selected a few karma examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github esr360 / Noah / build / modules / karma.js View on Github external
NOAH.test = (function(options) {

    // Options
    var callback  = options.callback || process.exit;
    var singlerun = (options.singlerun !== 'undefined') ? options.singlerun : true;

    karma.start({

        frameworks: [
            'mocha', 
            'chai', 
            'sinon-chai'
        ],

        plugins: [
            'karma-chai-plugins',
            'karma-mocha',
            'karma-mocha-reporter',
            'karma-phantomjs-launcher'
        ],

        files: options.files,
github smaato / react-test-kit / gulpfile.js View on Github external
gulp.task('unit', function(callback) {
  return KarmaServer.start(config.karma, function(exitStatus) {
    if (exitStatus) {
      throw 'Unit testing failed';
    } else {
      callback(exitStatus);
    }
  });
});
github TerriaJS / terriajs / gulpfile.js View on Github external
function runKarma(configFile, done) {
    var karma = require('karma').Server;
    var path = require('path');

    karma.start({
        configFile: path.join(__dirname, configFile)
    }, function(e) {
        return done(e);
    });
}
github stuartmemo / theresas-sound-world / gulpfile.js View on Github external
gulp.task('test', function (done) {
    Server.start({
        configFile: __dirname + '/karma.conf.js',
        singleRun: true
    }, function () {
        done();
    });
});
github WURFL / ImageEngine-angular / gulpfile.js View on Github external
gulp.task('test', function (done) {
    karma.start({
        configFile: __dirname + '/karma.conf.js',
        singleRun: true
    }, done);
});
github dalste / starting-typescript-and-cocos2dx / CocosTsGame / gulpfile.js View on Github external
gulp.task('karma', function(done) {
    karma.start({
        configFile: __dirname + '/karma.config.js',
        singleRun: true
    }, function() {
        done();
    });
});
github i18next / ng-i18next / gulpfile.js View on Github external
function karmaTest(done) {
	karma.start({
		configFile: __dirname + '/karma.conf.js',
	}, function () {
		done();
	});
}
github funretro / distributed / gulpfile.js View on Github external
gulp.task("test-once", function(done) {
  Server.start(
    {
      configFile: __dirname + "/karma.conf.js",
      singleRun: true,
      reporters: ["mocha"]
    },
    function(error) {
      done(error);
    }
  );
});
github dalste / starting-typescript-and-cocos2dx / CocosTsGameMVC / gulpfile.js View on Github external
gulp.task('karma', function (done) {
    karma.start({
        configFile: __dirname + '/karma.config.js',
        singleRun: true
    }, function () {
        done();
    });
});
github zakhttp / super-mario-frogger / gulpfile.js View on Github external
function startTests(singleRun, done) {
    var Server = require('karma').Server;
    var excludeFiles = [];

    var server = Server.start({
        configFile: __dirname + '/karma.conf.js',
        exclude: excludeFiles,
        singleRun: !!singleRun
    }, karmaCompleted);

    function karmaCompleted(karmaResult) {
        var status = karmaResult === 1 ? 'ERROR' : 'SUCCESS';
        log('karma completed with status: ' + status);
        done();
    }
}