Home page Forum Wiki Mail Jabber Devel NIX-FILES

AltLUG Git

Git-repositories of Altai Linux User Group

Add testswarm integration as grunt task
[qunit.git] / grunt.js
index fbe9c70..4299191 100644 (file)
--- a/grunt.js
+++ b/grunt.js
@@ -44,10 +44,29 @@ grunt.initConfig({
                        }
                },
                addons: {
-                       // meh
                        options: {
+                               browser: true,
+                               curly: true,
+                               eqnull: true,
+                               eqeqeq: true,
+                               expr: true,
+                               evil: true,
+                               jquery: true,
+                               latedef: true,
+                               noarg: true,
                                onevar: true,
-                               smarttabs: true
+                               smarttabs: true,
+                               trailing: true,
+                               undef: true
+                       },
+                       globals: {
+                               module: true,
+                               test: true,
+                               asyncTest: true,
+                               expect: true,
+                               start: true,
+                               stop: true,
+                               QUnit: true
                        }
                },
                tests: {
@@ -55,7 +74,24 @@ grunt.initConfig({
        }
 });
 
-// Default task.
+grunt.registerTask( "testswarm", function( commit, configFile ) {
+       var testswarm = require( "testswarm" ),
+               config = grunt.file.readJSON( configFile );
+       testswarm({
+               url: "http://swarm.jquery.org/",
+               pollInterval: 10000,
+               done: this.async()
+       }, {
+               authUsername: "qunit",
+               authToken: config.qunit.authToken,
+               jobName: 'QUnit commit #<a href="https://github.com/jquery/qunit/commit/' + commit + '">' + commit + '</a>',
+               runMax: 3,
+               "runNames[]": "QUnit",
+               "runUrls[]": "http://swarm.jquery.org/git/qunit/" + commit + "/test/index.html",
+               "browserSets[]": ["popular"]
+       });
+});
+
 grunt.registerTask('default', 'lint qunit');
 
 };

Hosting is provided AltSPAHow to use Git
Please direct any questions on jabber alex.wolf@jabber.ru

Valid HTML 4.0 Transitional Valid CSS!

Designer Alexander Wolf