-
Notifications
You must be signed in to change notification settings - Fork 6
/
Gruntfile.js
executable file
·62 lines (55 loc) · 1.25 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
51
52
53
54
55
56
57
58
59
60
61
62
/**
* To debug gruntfile:
* node-debug $(which grunt) task
*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
mochaTest: {
run: {
options: {
ui : 'bdd',
reporter: 'spec',
},
//We require all our tests in the conf file, so we
//can do some pre-test functions before they are run.
src: ['./test/test.js']
},
save: {
options: {
ui : 'bdd',
require: [
function(){ global.save = true; } //pass save as true when generating/saving test output
],
reporter: 'spec'
},
src: ['./test/test.js']
},
display: {
options: {
ui : 'bdd',
require: [
function(){ global.display = true; }
],
reporter: 'spec'
},
src: ['./test/test.js']
}
}
});
grunt.loadNpmTasks('grunt-mocha-test');
grunt.registerTask('test-run', [
'mochaTest:run'
]);
grunt.registerTask('test-save', [
'mochaTest:save'
]);
grunt.registerTask('test-display', [
'mochaTest:display'
]);
//quick alias
grunt.registerTask('t',[
'mochaTest:run'
]);
};