forked from pubnub/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
executable file
·53 lines (50 loc) · 1.32 KB
/
Copy pathGruntfile.js
File metadata and controls
executable file
·53 lines (50 loc) · 1.32 KB
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
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
mocha_istanbul: {
coverage_unit: {
src: 'node.js/tests', // a folder works nicely
options: {
mask: '**/*.test.js'
}
}
},
mochaTest: {
unit: {
options: {
reporter: 'spec',
require: 'node.js/tests/tests-include.js',
quiet: false
},
src: ['node.js/tests/unit/*.test.js']
},
integration: {
options: {
reporter: 'spec',
require: 'node.js/tests/tests-include.js',
quiet: false
},
src: ['node.js/tests/integration/*.test.js']
}
},
eslint: {
target: [
'node.js/*.js',
'node.js/lib/*.js'
]
},
nodeunit: {
tests: ['node.js/**/tests/unit-test.js'],
options: {}
}
});
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-mocha-istanbul');
grunt.registerTask('test:mocha', 'mochaTest');
grunt.registerTask('test:unit', 'nodeunit');
grunt.registerTask('ci-test', ['mochaTest:unit', 'eslint']);
grunt.registerTask('test', ['mocha_istanbul', 'eslint']);
};