From ad690f815108cc1e05c2eb265e46140fd3236671 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Mon, 3 Dec 2012 00:49:40 -0500 Subject: [PATCH] Improvements per @jaubourg --- test/data/testinit.js | 4 +++- test/data/testrunner.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/data/testinit.js b/test/data/testinit.js index 2088407a6..862616d8a 100644 --- a/test/data/testinit.js +++ b/test/data/testinit.js @@ -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); diff --git a/test/data/testrunner.js b/test/data/testrunner.js index 085203c96..ce9697fc4 100644 --- a/test/data/testrunner.js +++ b/test/data/testrunner.js @@ -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, -- 2.39.5