From e5b19344f6868ed1623a6c51d7b9908bb7ebecb5 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Wed, 16 Sep 2015 08:18:50 -0500 Subject: [PATCH] Use $(npm bin) in gulp test --- tasks/gulp-tests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/gulp-tests.js b/tasks/gulp-tests.js index 580372adc7..e6c9e6e9bc 100644 --- a/tasks/gulp-tests.js +++ b/tasks/gulp-tests.js @@ -19,7 +19,7 @@ let testCount = (stdout, regexp) => { } let testBin = (string) => { - return `NODE_ENV=testing ./node_modules/.bin/${string}`; + return `NODE_ENV=testing $(npm bin)/${string}`; }; gulp.task('test:prepare:mongo', (cb) => { @@ -106,7 +106,7 @@ gulp.task('test:server_side:safe', ['test:prepare:build'], (cb) => { gulp.task('test:api-legacy', ['test:prepare:mongo'], (cb) => { let runner = exec( - testBin("istanbul cover -i 'website/src/**' --dir coverage/api-legacy ./node_modules/.bin/_mocha -- test/api-legacy"), + testBin("istanbul cover -i 'website/src/**' --dir coverage/api-legacy $(npm bin)/mocha -- test/api-legacy"), (err, stdout, stderr) => { cb(err); } @@ -116,7 +116,7 @@ gulp.task('test:api-legacy', ['test:prepare:mongo'], (cb) => { gulp.task('test:api-legacy:safe', ['test:prepare:mongo'], (cb) => { let runner = exec( - testBin("istanbul cover -i 'website/src/**' --dir coverage/api-legacy ./node_modules/.bin/_mocha -- test/api-legacy"), + testBin("istanbul cover -i 'website/src/**' --dir coverage/api-legacy $(npm bin)/mocha -- test/api-legacy"), (err, stdout, stderr) => { testResults.push({ suite: 'API (legacy) Specs',