From bcbcdd2b2c1bb7075f4f73dc89ca7d65db2a09ed Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Tue, 22 Oct 2019 20:49:37 +0200 Subject: [PATCH] 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 --- Gruntfile.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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: { -- 2.39.5