]> source.dussan.org Git - jquery.git/commitdiff
Improvements per @jaubourg
authorRichard Gibson <richard.gibson@gmail.com>
Mon, 3 Dec 2012 05:49:40 +0000 (00:49 -0500)
committerRichard Gibson <richard.gibson@gmail.com>
Mon, 3 Dec 2012 05:49:40 +0000 (00:49 -0500)
test/data/testinit.js
test/data/testrunner.js

index 2088407a6d641e6a2c1b3304c24224d56928c8b4..862616d8a6b99c4152b51149ff9eb5097b68f0ee 100644 (file)
@@ -194,7 +194,9 @@ function ajaxTest( title, expect, options ) {
                                        options.afterSend( request );
                                }
 
-                               return request.then( callIfDefined( "done", "success" ), callIfDefined( "fail", "error" ) );
+                               return request
+                                       .done( callIfDefined( "done", "success" ) )
+                                       .fail( callIfDefined( "fail", "error" ) );
                        });
 
                jQuery.when.apply( jQuery, requests ).always( complete, options.teardown, start);
index 085203c960523afbe4706e3f34bf096f392bf79e..ce9697fc4b75a4417555844e7635e2cc6570eab6 100644 (file)
@@ -141,7 +141,7 @@ var Globals = (function() {
        return {
                register: function( name ) {
                        globals[ name ] = true;
-                       jQuery.globalEval( "var " + name );
+                       jQuery.globalEval( "var " + name + " = undefined;" );
                },
                cleanup: function() {
                        var name,