remove globals in tests for compability with ?noglobals, to be enabled by default
[jquery.git] / test / unit / ajax.js
index 564f692..f7c67b7 100644 (file)
@@ -763,7 +763,10 @@ test("jQuery.getJSON - Using Native JSON", function() {
 
        stop();
        jQuery.getJSON(url("data/json.php"), function(json) {
-               window.JSON = old;
+               if (!old)
+                       delete window.JSON
+               else
+                       window.JSON = old;
          equals( json, true, "Verifying return value" );
          start();
        });