Skip to content

Commit

Permalink
Use istanbul/lib/cli.js instead of node_modules/.bin/istanbul
Browse files Browse the repository at this point in the history
Fixes #1331

Due to the way, "bin"-files are distributed into the node_modules/.bin
directory on Windows, the task "test:cov" did not work on Windows.
This commit uses the node-script directly.
  • Loading branch information
nknapp committed May 14, 2017
1 parent 7378f85 commit 6e6269f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/test.js
Expand Up @@ -32,7 +32,7 @@ module.exports = function(grunt) {
grunt.registerTask('test:cov', function() {
var done = this.async();

var runner = childProcess.fork('node_modules/.bin/istanbul', ['cover', '--source-map', '--', './spec/env/runner.js'], {stdio: 'inherit'});
var runner = childProcess.fork('node_modules/istanbul/lib/cli.js', ['cover', '--source-map', '--', './spec/env/runner.js'], {stdio: 'inherit'});
runner.on('close', function(code) {
if (code != 0) {
grunt.fatal(code + ' tests failed');
Expand All @@ -55,7 +55,7 @@ module.exports = function(grunt) {
grunt.registerTask('test:check-cov', function() {
var done = this.async();

var runner = childProcess.fork('node_modules/.bin/istanbul', ['check-coverage', '--statements', '100', '--functions', '100', '--branches', '100', '--lines 100'], {stdio: 'inherit'});
var runner = childProcess.fork('node_modules/istanbul/lib/cli.js', ['check-coverage', '--statements', '100', '--functions', '100', '--branches', '100', '--lines 100'], {stdio: 'inherit'});
runner.on('close', function(code) {
if (code != 0) {
grunt.fatal('Coverage check failed: ' + code);
Expand Down

0 comments on commit 6e6269f

Please sign in to comment.