]> source.dussan.org Git - jquery.git/commitdiff
Build: Make it possible to change browserSets in the testswarm task
authorMichał Gołębiowski <m.goleb@gmail.com>
Mon, 10 Mar 2014 19:37:11 +0000 (20:37 +0100)
committerMichał Gołębiowski <m.goleb@gmail.com>
Mon, 10 Mar 2014 19:57:28 +0000 (20:57 +0100)
(cherry-picked from 14872941f9de78e7436e58ac1f03a4b2d5aa34e8)

build/tasks/testswarm.js

index a6015c34dc9d148ba887efcd59fac286af5fbe3b..0c1e3796d763ed0f76f736722284df3c55e9e897 100644 (file)
@@ -2,7 +2,7 @@ module.exports = function( grunt ) {
 
        "use strict";
 
-       grunt.registerTask( "testswarm", function( commit, configFile ) {
+       grunt.registerTask( "testswarm", function( commit, configFile, browserSets ) {
                var jobName,
                        testswarm = require( "testswarm" ),
                        runs = {},
@@ -11,6 +11,10 @@ module.exports = function( grunt ) {
                        config = grunt.file.readJSON( configFile ).jquery,
                        tests = grunt.config([ this.name, "tests" ]);
 
+               if ( !browserSets ) {
+                       browserSets = [ "popular", "ios" ];
+               }
+
                if ( pull ) {
                        jobName = "Pull <a href='https://github.com/jquery/jquery/pull/" +
                                pull[ 1 ] + "'>#" + pull[ 1 ] + "</a>";
@@ -38,7 +42,7 @@ module.exports = function( grunt ) {
                                name: jobName,
                                runs: runs,
                                runMax: config.runMax,
-                               browserSets: [ "popular", "ios" ]
+                               browserSets: browserSets
                        }, function( err, passed ) {
                                if ( err ) {
                                        grunt.log.error( err );