From b270f58bc839ce006680baa8faf11fe70218461a Mon Sep 17 00:00:00 2001 From: "Pat O'Neill" Date: Thu, 21 Jul 2016 13:26:46 -0400 Subject: [PATCH] @misteroneill fixed npm test from running coveralls locally. closes #3449 --- CHANGELOG.md | 1 + build/grunt.js | 3 ++- package.json | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4c89f537d..2434e6c345 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ CHANGELOG * @OwenEdwards removed spurious head tags in the simple-embed example ([view](https://github.com/videojs/video.js/pull/3438)) * @ntadej added a null check to errorDisplay usage ([view](https://github.com/videojs/video.js/pull/3440)) * @misteroneill fixed logging issues on IE by separating fn.apply and stringify checks ([view](https://github.com/videojs/video.js/pull/3444)) +* @misteroneill fixed npm test from running coveralls locally ([view](https://github.com/videojs/video.js/pull/3449)) -------------------- diff --git a/build/grunt.js b/build/grunt.js index 609abe0f88..379a815ac2 100644 --- a/build/grunt.js +++ b/build/grunt.js @@ -494,7 +494,8 @@ module.exports = function(grunt) { // Default task - build and test grunt.registerTask('default', ['test']); - grunt.registerTask('test', ['build', 'karma:defaults']); + // The test script includes coveralls only when the TRAVIS env var is set. + grunt.registerTask('test', ['build', 'karma:defaults'].concat(process.env.TRAVIS && 'coveralls').filter(Boolean)); // Run while developing grunt.registerTask('dev', ['build', 'connect:dev', 'concurrent:watchSandbox']); diff --git a/package.json b/package.json index 0481716ac7..fae828ea55 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "homepage": "http://videojs.com", "author": "Steve Heffernan", "scripts": { - "test": "grunt test && if [ '$TRAVIS' ]; then grunt coveralls; fi;" + "test": "grunt test" }, "repository": { "type": "git",