Adds jQuery collection to objects that will be used as global events context if provi...
[jquery.git] / test / data / testrunner.js
index a459340..beb0fe2 100644 (file)
@@ -1,5 +1,16 @@
 jQuery.noConflict(); // Allow the test to run with other libs or jQuery's.
 
+// jQuery-specific QUnit.reset
+(function() {
+       var reset = QUnit.reset;
+       var ajaxSettings = jQuery.ajaxSettings
+       QUnit.reset = function() {
+               reset.apply(this, arguments);
+               jQuery.event.global = {};
+               jQuery.ajaxSettings = jQuery.extend({}, ajaxSettings);
+       };
+})();
+
 // load testswarm agent
 (function() {
        var url = window.location.search;
@@ -7,5 +18,9 @@ jQuery.noConflict(); // Allow the test to run with other libs or jQuery's.
        if ( !url || url.indexOf("http") !== 0 ) {
                return;
        }
-       document.write("<scr" + "ipt src='http://testswarm.com/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
+
+       // (Temporarily) Disable Ajax tests to reduce network strain
+       isLocal = QUnit.isLocal = true;
+
+       document.write("<scr" + "ipt src='http://swarm.jquery.org/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
 })();