-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgruntfile.js
40 lines (34 loc) · 938 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
module.exports = function(grunt) {
grunt.initConfig({
mocha: {
reporter: 'dot',
timeout: '90000', // in ms
url: 'http://localhost:8080/test'
},
shell: {
mocha: {
command: 'node ./node_modules/mocha-phantomjs/bin/mocha-phantomjs ' +
'-R <%= mocha.reporter %> ' +
'-t <%= mocha.timeout %> ' +
'<%= mocha.url %>',
options: {
failOnError: true,
stdout: true
}
}
}
});
grunt.loadNpmTasks('grunt-shell');
grunt.registerTask('mocha', function() {
if (grunt.option('reporter')) {
grunt.config('mocha.reporter', grunt.option('reporter'));
}
if (grunt.option('timeout')) {
grunt.config('mocha.timeout', grunt.option('timeout'));
}
if (grunt.option('url')) {
grunt.config('mocha.url', grunt.option('url'));
}
grunt.task.run('shell:mocha');
});
};