diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2015-07-29 18:10:04 +0300 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2015-07-30 20:46:31 +0300 |
commit | aabe94edb4880c75eeebc5b5b5d66a9ad17008fe (patch) | |
tree | 41f685d530ab14485218cdec7d9c021390f0aa39 /test/unit/ajax.js | |
parent | 360a4780339b7f412b75ad8a06dca7f39616f654 (diff) | |
download | jquery-aabe94edb4880c75eeebc5b5b5d66a9ad17008fe.tar.gz jquery-aabe94edb4880c75eeebc5b5b5d66a9ad17008fe.zip |
Tests: don't use deprecated argument in test declaration
Closes gh-2507
Diffstat (limited to 'test/unit/ajax.js')
-rw-r--r-- | test/unit/ajax.js | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js index e216f34a2..6eedc5784 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -6,7 +6,9 @@ module( "ajax", { }); (function() { - test("Unit Testing Environment", 2, function () { + test("Unit Testing Environment", function () { + expect( 2 ); + ok( hasPHP, "Running in an environment with PHP support. The AJAX tests only run if the environment supports PHP!" ); ok( !isLocal, "Unit tests are not ran from file:// (especially in Chrome. If you must test from file:// with Chrome, run it with the --allow-file-access-from-files flag!)" ); }); @@ -1288,7 +1290,9 @@ module( "ajax", { } }); - test( "#7531 - jQuery.ajax() - Location object as url", 1, function () { + test( "#7531 - jQuery.ajax() - Location object as url", function () { + expect( 1 ); + var xhr, success = false; try { @@ -1389,7 +1393,9 @@ module( "ajax", { }); }); - test( "#9887 - jQuery.ajax() - Context with circular references (#9887)", 2, function () { + test( "#9887 - jQuery.ajax() - Context with circular references (#9887)", function () { + expect( 2 ); + var success = false, context = {}; context.field = context; @@ -1699,7 +1705,9 @@ module( "ajax", { //----------- jQuery.domManip() - test( "#11264 - jQuery.domManip() - no side effect because of ajaxSetup or global events", 1, function() { + test( "#11264 - jQuery.domManip() - no side effect because of ajaxSetup or global events", function() { + expect( 1 ); + jQuery.ajaxSetup({ type: "POST" }); @@ -2086,7 +2094,9 @@ module( "ajax", { //----------- jQuery.active - test( "jQuery.active", 1, function() { + test( "jQuery.active", function() { + expect( 1 ); + ok( jQuery.active === 0, "ajax active counter should be zero: " + jQuery.active ); }); |