Files
Umbraco-CMS/src/Umbraco.Web.UI.Client/gulp/tasks/test.js

40 lines
821 B
JavaScript
Raw Normal View History

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