Switch code coverage reporter to nyc (#1005)
This commit is contained in:
parent
1462affe88
commit
94a04eaa5c
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,3 +7,4 @@ dist/
|
||||||
openpgp.store/
|
openpgp.store/
|
||||||
doc/
|
doc/
|
||||||
browserify-cache*.json
|
browserify-cache*.json
|
||||||
|
.nyc_output/
|
||||||
|
|
30
Gruntfile.js
30
Gruntfile.js
|
@ -103,6 +103,23 @@ module.exports = function(grunt) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
nyc: {
|
||||||
|
cover: {
|
||||||
|
options: {
|
||||||
|
include: ['dist/**'],
|
||||||
|
reporter: ['text-summary'],
|
||||||
|
reportDir: 'coverage'
|
||||||
|
},
|
||||||
|
cmd: false,
|
||||||
|
args: ['grunt', 'mochaTest'],
|
||||||
|
sourceMap: true
|
||||||
|
},
|
||||||
|
report: {
|
||||||
|
options: {
|
||||||
|
reporter: 'text'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
replace: {
|
replace: {
|
||||||
openpgp: {
|
openpgp: {
|
||||||
src: ['dist/openpgp.js'],
|
src: ['dist/openpgp.js'],
|
||||||
|
@ -200,15 +217,6 @@ module.exports = function(grunt) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mocha_istanbul: {
|
|
||||||
coverage: {
|
|
||||||
src: 'test',
|
|
||||||
options: {
|
|
||||||
root: '.',
|
|
||||||
timeout: 240000
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mochaTest: {
|
mochaTest: {
|
||||||
unittests: {
|
unittests: {
|
||||||
options: {
|
options: {
|
||||||
|
@ -285,12 +293,12 @@ module.exports = function(grunt) {
|
||||||
grunt.loadNpmTasks('grunt-jsbeautifier');
|
grunt.loadNpmTasks('grunt-jsbeautifier');
|
||||||
grunt.loadNpmTasks('grunt-jsdoc');
|
grunt.loadNpmTasks('grunt-jsdoc');
|
||||||
grunt.loadNpmTasks('gruntify-eslint');
|
grunt.loadNpmTasks('gruntify-eslint');
|
||||||
grunt.loadNpmTasks('grunt-mocha-istanbul');
|
|
||||||
grunt.loadNpmTasks('grunt-mocha-test');
|
grunt.loadNpmTasks('grunt-mocha-test');
|
||||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||||
grunt.loadNpmTasks('grunt-contrib-connect');
|
grunt.loadNpmTasks('grunt-contrib-connect');
|
||||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||||
|
grunt.loadNpmTasks('grunt-simple-nyc');
|
||||||
|
|
||||||
grunt.registerTask('set_version', function() {
|
grunt.registerTask('set_version', function() {
|
||||||
if (!version) {
|
if (!version) {
|
||||||
|
@ -340,6 +348,6 @@ module.exports = function(grunt) {
|
||||||
grunt.registerTask('default', ['build']);
|
grunt.registerTask('default', ['build']);
|
||||||
// Test/Dev tasks
|
// Test/Dev tasks
|
||||||
grunt.registerTask('test', ['eslint', 'mochaTest']);
|
grunt.registerTask('test', ['eslint', 'mochaTest']);
|
||||||
grunt.registerTask('coverage', ['mocha_istanbul:coverage']);
|
grunt.registerTask('coverage', ['nyc']);
|
||||||
grunt.registerTask('browsertest', ['build', 'browserify:unittests', 'copy:browsertest', 'connect:test', 'watch']);
|
grunt.registerTask('browsertest', ['build', 'browserify:unittests', 'copy:browsertest', 'connect:test', 'watch']);
|
||||||
};
|
};
|
||||||
|
|
|
@ -60,13 +60,13 @@
|
||||||
"grunt-header": "^1.1.0",
|
"grunt-header": "^1.1.0",
|
||||||
"grunt-jsbeautifier": "^0.2.13",
|
"grunt-jsbeautifier": "^0.2.13",
|
||||||
"grunt-jsdoc": "^2.2.1",
|
"grunt-jsdoc": "^2.2.1",
|
||||||
"grunt-mocha-istanbul": "^5.0.2",
|
|
||||||
"grunt-mocha-test": "^0.13.3",
|
"grunt-mocha-test": "^0.13.3",
|
||||||
|
"grunt-simple-nyc": "^3.0.1",
|
||||||
"grunt-terser": "^0.1.0",
|
"grunt-terser": "^0.1.0",
|
||||||
"grunt-text-replace": "~0.4.0",
|
"grunt-text-replace": "~0.4.0",
|
||||||
"gruntify-eslint": "^4.0.0",
|
"gruntify-eslint": "^4.0.0",
|
||||||
"istanbul": "^0.4.5",
|
|
||||||
"mocha": "^5.0.0",
|
"mocha": "^5.0.0",
|
||||||
|
"nyc": "^14.1.1",
|
||||||
"sinon": "^4.3.0",
|
"sinon": "^4.3.0",
|
||||||
"text-encoding-utf-8": "^1.0.2",
|
"text-encoding-utf-8": "^1.0.2",
|
||||||
"whatwg-fetch": "^2.0.3",
|
"whatwg-fetch": "^2.0.3",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user