-
Notifications
You must be signed in to change notification settings - Fork 8
/
gulpfile.js
60 lines (50 loc) · 1.46 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
var gulp = require('gulp'),
mocha = require('gulp-mocha'),
selenium = require('selenium-standalone'),
connect = require('gulp-connect'),
server;
global.functionalTestType = 'local';
gulp.task('start-web-server', function(callback) {
connect.server({
root: [__dirname],
port: 8000,
livereload: false
});
callback();
});
gulp.task('start-selenium', function(callback) {
server = selenium();
server.stdout.on('data', function(output) {
console.log(output);
});
callback();
});
gulp.task('execute-functional-tests', function() {
return gulp.src('tests/functional/specs/**/*.js')
.pipe(mocha({
reporter: 'spec',
timeout: 60000
})
);
});
gulp.task('functional-test-local', function() {
// TODO: find a way to pass data to gulp tasks that doesn't require globals
global.functionalTestType = 'local';
return gulp.src('tests/functional/specs/**/*.js')
.pipe(mocha({
reporter: 'spec',
timeout: 60000
})
);
// TODO: fix functional test watch - was working before...
//gulp.watch(['tests/functional/specs/**/*.js'], ['execute-functional-tests']);
});
gulp.task('functional-test-all-browsers', function() {
global.functionalTestType = 'all-browsers';
return gulp.src('tests/functional/specs/**/*.js')
.pipe(mocha({
reporter: 'spec',
timeout: 60000
})
);
});