Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
update(tools): karma-fast updated with revised API.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBurleson committed Dec 11, 2015
1 parent 195dbb4 commit 67ebee6
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions gulp/tasks/karma-fast.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@ var gutil = require('gulp-util');
var karma = require('karma').server;
var util = require('../util');
var ROOT = require('../const').ROOT;
var Server = require('karma').Server;
var karmaConfig = {
logLevel: 'warn',
singleRun: true,
autoWatch: false,
configFile: ROOT + '/config/karma.conf.js'
};

var args = util.args;

// NOTE: `karma-fast` does NOT pre-make a full build of JS and CSS
// exports.dependencies = ['build'];

exports.task = function (done) {
var errorCount = 0;
var karmaConfig = {
logLevel: 'warn',
singleRun: true,
autoWatch: false,
configFile: ROOT + '/config/karma.conf.js'
};

if ( args.browsers ) {
karmaConfig.browsers = args.browsers.trim().split(',');
Expand All @@ -27,7 +29,9 @@ exports.task = function (done) {


gutil.log('Running unit tests on unminified source.');
karma.start(karmaConfig, captureError(clearEnv,clearEnv));

karma = new Server(karmaConfig, captureError(clearEnv,clearEnv));
karma.start();


function clearEnv() {
Expand Down

0 comments on commit 67ebee6

Please sign in to comment.