forked from openedx-unsupported/edx-notifications
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
41 lines (36 loc) · 891 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
var gulp = require('gulp');
var Server = require('karma').Server;
var coverageOnOff = 'coverage';
/**
* Run test once and exit
*/
gulp.task('test', function (done) {
new Server({
configFile: __dirname + '/karma.conf.js',
singleRun: true
}, function (exitCode) {
exitCode ? process.exit(exitCode) : done();
}).start();
});
/**
* Watch for file changes and re-run tests on each change
*/
gulp.task('tdd', function (done) {
new Server({
configFile: __dirname + '/karma.conf.js',
}, function (exitCode) {
exitCode ? process.exit(exitCode) : done();
}).start();
});
gulp.task('default', gulp.series(['tdd']));
/**
* Run test in debug mode
*/
gulp.task('debug', function (done) {
new Server({
configFile: __dirname + '/karma.conf.js',
singleRun: false
}, function (exitCode) {
exitCode ? process.exit(exitCode) : done();
}).start();
});