-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
46 lines (36 loc) · 925 Bytes
/
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
module.exports = function (grunt) {
grunt.initConfig({
express: {
test: {
options: {
script: 'server.js',
port: 8000
}
}
},
casperjs: {
files: ['src/test/**/*.js']
},
curl: {
resetCoverage: {
src: {
url: 'http://localhost:8000/coverage/reset',
method: 'POST'
},
dest: 'coverage/reset_coverage.dump'
},
downloadCoverage: {
src: 'http://localhost:8000/coverage/download',
dest: 'coverage/report.zip'
}
},
unzip: {
'coverage/report': 'coverage/report.zip'
}
});
grunt.loadNpmTasks('grunt-express-server');
grunt.loadNpmTasks('grunt-casperjs');
grunt.loadNpmTasks('grunt-curl');
grunt.loadNpmTasks('grunt-zip');
grunt.registerTask('test', ['express:test', 'curl:resetCoverage', 'casperjs', 'curl:downloadCoverage', 'unzip']);
};