-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
40 lines (34 loc) · 901 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 = (grunt) => {
// const banner = `/*
// <%= pkg.name %> <%= pkg.version %>- <%= pkg.description %>
// <%= pkg.repository.url %>
// Built on <%= grunt.template.today("yyyy-mm-dd") %>
// */
// `;
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
mocha_istanbul: {
coverage: {
src: 'test', // a folder works nicely
options: {
mask: '*.js',
},
},
},
simplemocha: {
options: {
globals: ['expect'],
timeout: 3000,
ignoreLeaks: false,
ui: 'bdd',
reporter: 'tap',
},
all: { src: ['test/*.js'] },
},
});
grunt.loadNpmTasks('grunt-simple-mocha');
grunt.loadNpmTasks('grunt-mocha-istanbul');
grunt.registerTask('default', ['mocha_istanbul']);
grunt.registerTask('test', ['simplemocha']);
grunt.registerTask('cover', ['mocha_istanbul']);
};