From 6e6269fcd7de568a492d8a0a3277dbc136190336 Mon Sep 17 00:00:00 2001 From: Nils Knappmeier Date: Sat, 13 May 2017 13:00:56 +0200 Subject: [PATCH 1/2] Use istanbul/lib/cli.js instead of node_modules/.bin/istanbul 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. --- tasks/test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/test.js b/tasks/test.js index 18a6c26b..d7ce04d0 100644 --- a/tasks/test.js +++ b/tasks/test.js @@ -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'); @@ -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); From b50ef038238be231b931810b2944c9ef25622467 Mon Sep 17 00:00:00 2001 From: Nils Knappmeier Date: Sat, 13 May 2017 22:56:30 +0200 Subject: [PATCH 2/2] Force LF line-endings for spec/artifacts Fixes #1331 --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..cb9d99bb --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.handlebars text eol=lf