-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
37 lines (29 loc) · 898 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
var gulp = require('gulp');
var _ = require('lodash');
var karma = require('karma').server;
var karmaConf = require('./karma.conf');
var karmaConfFor = function(version) {
var conf = _.clone(karmaConf);
conf.files = _.clone(karmaConf.files);
conf.files.unshift('test/lib/angular-*' + version + '.js');
return conf;
};
gulp.task('test:legacy', function (done) {
karma.start(_.assign({}, karmaConfFor('1.2.21'), {singleRun: true}), done);
});
/**
* Run test once and exit
*/
gulp.task('test', ['test:legacy'], function (done) {
karma.start(_.assign({}, karmaConfFor('1.3.6'), {singleRun: true}), done);
});
/**
* Watch for file changes and re-run tests on each change
*/
gulp.task('tdd:legacy', function (done) {
karma.start(karmaConfFor('1.2.21'), done);
});
gulp.task('tdd', function (done) {
karma.start(karmaConfFor('1.3.6'), done);
});
gulp.task('default', ['tdd']);