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
This commit is contained in:
Michał Gołębiowski-Owczarek 2019-10-22 20:49:37 +02:00 committed by GitHub
parent 2d5ad6d23e
commit bcbcdd2b2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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