Files
Umbraco-CMS/src/Umbraco.Web.UI.Client/gulp/tasks/test.js
2020-11-23 11:31:31 +01:00

40 lines
821 B
JavaScript

'use strict';
var karmaServer = require('karma').Server;
/**************************
* Build tests
**************************/
// Karma test
function testUnit() {
return new karmaServer({
configFile: __dirname + "/../../test/config/karma.conf.js"
})
.start();
};
// Run karma test server
function runUnitTestServer() {
return new karmaServer({
configFile: __dirname + "/../../test/config/karma.conf.js",
autoWatch: true,
port: 9999,
singleRun: false,
keepalive: true
})
.start();
};
function testE2e() {
return new karmaServer({
configFile: __dirname + "/../../test/config/e2e.js",
keepalive: true
})
.start();
};
module.exports = { testUnit: testUnit, testE2e: testE2e, runUnitTestServer: runUnitTestServer };