From: Michał Gołębiowski-Owczarek Date: Tue, 22 Oct 2019 18:49:37 +0000 (+0200) Subject: Build: Run tests on Travis only on browsers defined in the config X-Git-Tag: 4.0.0-beta~232 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bcbcdd2b2c1bb7075f4f73dc89ca7d65db2a09ed;p=jquery.git Build: Run tests on Travis only on browsers defined in the config The environmental variable BROWSERS was being created but it wasn't read in the list of browsers to pass to Karma. Closes gh-4532 --- diff --git a/Gruntfile.js b/Gruntfile.js index 7f21bf613..831ca4b88 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -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" ); @@ -190,7 +192,7 @@ module.exports = function( grunt ) { singleRun: true }, main: { - browsers: [ "ChromeHeadless", "FirefoxHeadless" ] + browsers: isTravis && travisBrowsers || [ "ChromeHeadless", "FirefoxHeadless" ] }, jsdom: {