-
-
Notifications
You must be signed in to change notification settings - Fork 77
/
gulpfile.js
40 lines (36 loc) · 907 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
'use strict';
var gulp = require('gulp');
var runSequence = require('run-sequence');
var webserver = require('gulp-webserver');
var gulpProtractorAngular = require('gulp-angular-protractor');
var exit = require('gulp-exit');
gulp.task('webserver', function() {
return gulp
.src('')
.pipe(webserver({
hot: 'localhost',
port: 8888
}));
});
gulp.task('protractor', function(callback) {
gulp.src(['test/spec.js'])
.pipe(gulpProtractorAngular({
'configFile': 'test/protractor.conf.js',
'args': ['--baseUrl', 'http://localhost:8888'],
'debug': true,
'autoStartStopServer': true
}))
.on('error', function(e) { console.log(e); })
.on('end', function() {
callback();
});
});
gulp.task('test', function(callback) {
runSequence(
'webserver',
'protractor',
function() {
gulp.src("").pipe(exit());
callback();
});
});