-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathGruntfile.js
48 lines (45 loc) · 1.09 KB
/
Gruntfile.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
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-protractor-webdriver');
grunt.loadNpmTasks('grunt-protractor-runner');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.initConfig({
// Configure a mochaTest task
mochaTest: {
test: {
options: {
reporter: 'spec'
},
src: ['test/units/*.js']
}
},
protractor: {
options: {
keepAlive: false, // If false, the grunt process stops when the test fails.
noColor: false, // If true, protractor will not use colors in its output.
args: {}
},
e2e: {
options: {
configFile: 'protractor-conf.js', // Target-specific config file
}
}
},
protractor_webdriver: {
webdriver: {
options: {
path: 'node_modules/.bin/'
},
},
},
connect: {
server: {
options: {
port: 8080,
base: 'test/app'
}
}
}
});
grunt.registerTask('test', [ 'connect:server', 'mochaTest', 'protractor_webdriver', 'protractor:e2e']);
};