This repository was archived by the owner on Aug 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathGruntfile.js
More file actions
77 lines (72 loc) · 2.72 KB
/
Gruntfile.js
File metadata and controls
77 lines (72 loc) · 2.72 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
module.exports = function(grunt){
grunt.initConfig({
// mochaTest: {
// test: {
// options: {
// require: './tests/blanket',
// reporter: 'spec',
// quiet: false, // Optionally suppress output to standard out (defaults to false)
// },
// src: ['**/__test__/*.js']
// },
// coverage:{
// options : {
// require: './tests/bable-setup.js',
// reporter: 'html-cov',
// quiet: false,
// captureFile: 'coverage.html'
// },
// src: ['**/__test__/*.js']
// }
// }
mocha_istanbul: {
target : {
options : {
dryRun: true,
ui: true,
scriptPath: require.resolve('babel-istanbul'),
istanbulOptions: '--use-babel-runtime',
require: './test/test-setup.js'
//mochaOptions: '--require ./tests/bable-setup.js'
}
},
coverage: {
src: ['**/__test__/*.js'],
options : {
dryRun: false,
coverageFolder: 'coverage',
root: './lib',
excludes: ['**/__test__/*.js'],
print: 'detail',
// scriptPath: require.resolve('babel-istanbul'),
istanbulOptions: ['--use-babel-runtime'],
//mochaOptions: ['require ./tests/bable-setup.js'],
require: './test/test-setup.js',
recursive: true,
istanbulOptions: ['--include-all-sources'],
// reportFormats: ['lcov', 'html']
}
}
},
coveralls: {
// Options relevant to all targets
options: {
// When true, grunt-coveralls will only print a warning rather than
// an error, to prevent CI builds from failing unnecessarily (e.g. if
// coveralls.io is down). Optional, defaults to false.
force: true
},
post_lcov: {
// LCOV coverage file (can be string, glob or array)
src: 'coverage/lcov.info',
options: {
// Any options for just this target
}
},
},
});
grunt.loadNpmTasks('grunt-mocha-istanbul');
grunt.loadNpmTasks('grunt-coveralls');
grunt.registerTask('test', ['mocha_istanbul:coverage']);
grunt.registerTask('test:coveralls', ['coveralls:post_lcov']);
};