Skip to content

Commit 0a2e1a1

Browse files
committed
Build: Allow to pass custom browserSets to the testswarm* tasks
This is needed to be able to test UI with Core Git that doesn't support IE 8. Ref jquerygh-1646
1 parent cd7f8f0 commit 0a2e1a1

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

build/tasks/testswarm.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@ var versions = {
3434
"Widget": "widget/widget.html"
3535
};
3636

37-
function submit( commit, runs, configFile, extra, done ) {
37+
function submit( commit, runs, configFile, extra, browserSets, done ) {
3838
var testName,
3939
testswarm = require( "testswarm" ),
4040
config = grunt.file.readJSON( configFile ).jqueryui,
4141
commitUrl = "https://github.com/jquery/jquery-ui/commit/" + commit;
4242

43+
browserSets = browserSets || config.browserSets;
44+
4345
if ( extra ) {
4446
extra = " (" + extra + ")";
4547
}
@@ -60,7 +62,7 @@ function submit( commit, runs, configFile, extra, done ) {
6062
name: "Commit <a href='" + commitUrl + "'>" + commit.substr( 0, 10 ) + "</a>" + extra,
6163
runs: runs,
6264
runMax: config.runMax,
63-
browserSets: config.browserSets,
65+
browserSets: browserSets,
6466
timeout: 1000 * 60 * 30
6567
}, function( error, passed ) {
6668
if ( error ) {
@@ -70,23 +72,23 @@ function submit( commit, runs, configFile, extra, done ) {
7072
} );
7173
}
7274

73-
grunt.registerTask( "testswarm", function( commit, configFile ) {
75+
grunt.registerTask( "testswarm", function( commit, configFile, browserSets ) {
7476
var test,
7577
latestTests = {};
7678
for ( test in tests ) {
7779
latestTests[ test ] = tests[ test ] + "?nojshint=true";
7880
}
79-
submit( commit, latestTests, configFile, "", this.async() );
81+
submit( commit, latestTests, configFile, "", browserSets, this.async() );
8082
} );
8183

82-
grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile, minor ) {
84+
grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile, minor, browserSets ) {
8385
var allTests = {};
8486
versions[ minor ].split( " " ).forEach( function( version ) {
8587
for ( var test in tests ) {
8688
allTests[ test + "-" + version ] = tests[ test ] + "?nojshint=true&jquery=" + version;
8789
}
8890
} );
89-
submit( commit, allTests, configFile, "core " + minor, this.async() );
91+
submit( commit, allTests, configFile, "core " + minor, browserSets, this.async() );
9092
} );
9193

9294
};

0 commit comments

Comments
 (0)