Skip to content

Commit

Permalink
Build: Run tests on Travis only on browsers defined in the config
Browse files Browse the repository at this point in the history
The environmental variable BROWSERS was being created but it wasn't read in the
list of browsers to pass to Karma.

Closes gh-4532
  • Loading branch information
mgol authored Oct 22, 2019
1 parent 2d5ad6d commit bcbcdd2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ module.exports = function( grunt ) {
}

var fs = require( "fs" ),
gzip = require( "gzip-js" );
gzip = require( "gzip-js" ),
isTravis = process.env.TRAVIS,
travisBrowsers = process.env.BROWSERS && process.env.BROWSERS.split( "," );

if ( !grunt.option( "filename" ) ) {
grunt.option( "filename", "jquery.js" );
Expand Down Expand Up @@ -190,7 +192,7 @@ module.exports = function( grunt ) {
singleRun: true
},
main: {
browsers: [ "ChromeHeadless", "FirefoxHeadless" ]
browsers: isTravis && travisBrowsers || [ "ChromeHeadless", "FirefoxHeadless" ]
},

jsdom: {
Expand Down

0 comments on commit bcbcdd2

Please sign in to comment.