forked from streetmix/streetmix
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
50 lines (49 loc) · 1.2 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
49
50
var path = require('path')
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt)
grunt.initConfig({
env: {
test: {
NODE_ENV: 'test'
}
},
express: {
app: {
options: {
server: path.resolve(__dirname, 'app.js'),
port: process.env.PORT || 3000
}
}
},
protractor: {
local: {
options: {
configFile: './test/integration/local.conf.js',
keepAlive: true,
noColor: false,
args: {}
}
},
saucelabs: {
options: {
configFile: './test/integration/saucelabs.conf.js',
args: {
sauceUser: process.env.SAUCE_USERNAME,
sauceKey: process.env.SAUCE_ACCESS_KEY
}
}
}
},
shell: {
options: {
stderr: false
},
target: {
command: './node_modules/grunt-protractor-runner/scripts/webdriver-manager-update'
}
}
})
grunt.registerTask('test:travis', ['env:test', 'express:app', 'protractor:saucelabs'])
grunt.registerTask('test:local:setup', ['shell'])
grunt.registerTask('test:local', ['env:test', 'express:app', 'protractor:local'])
}