From c485f478df64630a2d23191777e306320db22a00 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Thu, 3 Apr 2014 11:39:11 +0200 Subject: [PATCH] chore(build): configure browsers under test via env.TEST_BROWSERS --- Gruntfile.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 0a2a35a1..7db7d886 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,9 +1,14 @@ module.exports = function(grunt) { - /* global Buffer */ - require('load-grunt-tasks')(grunt); + /* global Buffer,process*/ + + // configures browsers to run test against + // any of [ 'PhantomJS', 'Chrome', 'Firefox', 'IE'] + var TEST_BROWSERS = ((process.env.TEST_BROWSERS || '').replace(/^\s+|\s+$/, '') || 'PhantomJS').split(/\s*,\s*/g); + + // project configuration grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), @@ -44,7 +49,7 @@ module.exports = function(grunt) { singleRun: true, autoWatch: false, - browsers: ['PhantomJS'], + browsers: TEST_BROWSERS, browserify: { watch: false, @@ -53,7 +58,7 @@ module.exports = function(grunt) { } }, unit: { - browsers: [ 'Chrome' ] + browsers: TEST_BROWSERS } }, browserify: {