chore(build): configure browsers under test via env.TEST_BROWSERS

This commit is contained in:
Nico Rehwaldt 2014-04-03 11:39:11 +02:00
parent 62def97a2b
commit c485f478df
1 changed files with 9 additions and 4 deletions

View File

@ -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: {