From 281351e6b31fc28b18684ba5591798899783361a Mon Sep 17 00:00:00 2001 From: Kazuki-Nakanishi Date: Thu, 9 Mar 2017 15:28:13 +0000 Subject: [PATCH] Add istanbul to Gruntfile.js (#1189) --- Gruntfile.js | 11 +++++++++++ package.json | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 8cc406345..13584dc9a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -41,6 +41,16 @@ module.exports = function(grunt) { core: { src: ["test/_spec.js","test/red/**/*_spec.js"]}, nodes: { src: ["test/nodes/**/*_spec.js"]} }, + mocha_istanbul: { + options: { + globals: ['expect'], + timeout: 3000, + ignoreLeaks: false, + ui: 'bdd', + reporter: 'spec' + }, + coverage: { src: ['test/**/*_spec.js'] } + }, jshint: { options: { jshintrc:true @@ -396,6 +406,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-chmod'); grunt.loadNpmTasks('grunt-jsonlint'); + grunt.loadNpmTasks('grunt-mocha-istanbul'); grunt.registerMultiTask('attachCopyright', function() { var files = this.data.src; diff --git a/package.json b/package.json index 2cc364e8e..a63df197a 100644 --- a/package.json +++ b/package.json @@ -84,10 +84,12 @@ "grunt-nodemon":"~0.4.2", "grunt-sass":"~1.2.1", "grunt-simple-mocha": "~0.4.1", + "grunt-mocha-istanbul": "5.0.2", "mocha": "~3.2.0", "should": "^8.4.0", "sinon": "1.17.7", - "supertest": "2.0.1" + "supertest": "2.0.1", + "istanbul": "0.4.5" }, "engines": { "node": ">=4"