diff --git a/build/tasks/testswarm.js b/build/tasks/testswarm.js index 3de7a089b..c4839ae60 100644 --- a/build/tasks/testswarm.js +++ b/build/tasks/testswarm.js @@ -2,14 +2,16 @@ module.exports = function( grunt ) { "use strict"; - grunt.registerTask( "testswarm", function( commit, configFile, browserSets, timeout ) { - var jobName, + grunt.registerTask( "testswarm", function( commit, configFile, projectName ) { + var jobName, config, tests, testswarm = require( "testswarm" ), runs = {}, done = this.async(), - pull = /PR-(\d+)/.exec( commit ), - config = grunt.file.readJSON( configFile ).jquery, - tests = grunt.config([ this.name, "tests" ]); + pull = /PR-(\d+)/.exec( commit ); + + projectName = projectName || "jquery"; + config = grunt.file.readJSON( configFile )[ projectName ]; + tests = grunt.config([ this.name, "tests" ]); if ( pull ) { jobName = "Pull