From cd546aba748aeac09886921ebc1a5fcaa3778bf8 Mon Sep 17 00:00:00 2001 From: Oleg Gaidarenko Date: Tue, 18 Feb 2014 21:50:42 +0400 Subject: Tests: Improve jsonp tests Since global variable for callback always would be equal to undefined value it better to check for boolean instead --- test/unit/ajax.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/unit/ajax.js b/test/unit/ajax.js index c099e12b1..fcdfcb0f5 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -733,7 +733,7 @@ module( "ajax", { jsonpCallback: "functionToCleanUp", success: function( data ) { ok( data["data"], "JSON results returned (GET, custom callback name to be cleaned up)" ); - strictEqual( window["functionToCleanUp"], undefined, "Callback was removed (GET, custom callback name to be cleaned up)" ); + strictEqual( window["functionToCleanUp"], true, "Callback was removed (GET, custom callback name to be cleaned up)" ); var xhr; jQuery.ajax({ url: "data/jsonp.php", @@ -747,7 +747,7 @@ module( "ajax", { }); xhr.fail(function() { ok( true, "Ajax error JSON (GET, custom callback name to be cleaned up)" ); - strictEqual( window["functionToCleanUp"], undefined, "Callback was removed after early abort (GET, custom callback name to be cleaned up)" ); + strictEqual( window["functionToCleanUp"], true, "Callback was removed after early abort (GET, custom callback name to be cleaned up)" ); }); } }, { -- cgit v1.2.3