forked from dynamoose/dynamoose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
49 lines (44 loc) · 1.45 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
"use strict";
module.exports = (grunt) => {
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
mochaTest: {
test: {
options: {
reporter: "spec"
},
src: ["test/**/*.js"]
},
testCoverage: {
options: {
reporter: "spec",
require: "test/coverage/blanket"
},
src: ["test/**/*.js"]
},
coverage: {
options: {
reporter: "html-cov",
// use the quiet flag to suppress the mocha console output
quiet: true,
// specify a destination file to capture the mocha
// output (the quiet option does not suppress this)
captureFile: "coverage.html"
},
src: ["test/**/*.js"]
},
"travis-cov": {
options: {
reporter: "travis-cov"
},
src: ["test/**/*.js"]
}
}
});
// Load libs
grunt.loadNpmTasks("grunt-mocha-test");
// Register the default tasks
grunt.registerTask("default", ["mochaTest"]);
grunt.registerTask("test", ["mochaTest:test"]);
grunt.registerTask("coverage", ["mochaTest:testCoverage", "mochaTest:coverage", "mochaTest:travis-cov"]);
};