You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/unit/ajax.js
+15-5Lines changed: 15 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,9 @@ module( "ajax", {
6
6
});
7
7
8
8
(function(){
9
-
test("Unit Testing Environment",2,function(){
9
+
test("Unit Testing Environment",function(){
10
+
expect(2);
11
+
10
12
ok(hasPHP,"Running in an environment with PHP support. The AJAX tests only run if the environment supports PHP!");
11
13
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!)");
12
14
});
@@ -1288,7 +1290,9 @@ module( "ajax", {
1288
1290
}
1289
1291
});
1290
1292
1291
-
test("#7531 - jQuery.ajax() - Location object as url",1,function(){
1293
+
test("#7531 - jQuery.ajax() - Location object as url",function(){
1294
+
expect(1);
1295
+
1292
1296
varxhr,
1293
1297
success=false;
1294
1298
try{
@@ -1389,7 +1393,9 @@ module( "ajax", {
1389
1393
});
1390
1394
});
1391
1395
1392
-
test("#9887 - jQuery.ajax() - Context with circular references (#9887)",2,function(){
1396
+
test("#9887 - jQuery.ajax() - Context with circular references (#9887)",function(){
1397
+
expect(2);
1398
+
1393
1399
varsuccess=false,
1394
1400
context={};
1395
1401
context.field=context;
@@ -1699,7 +1705,9 @@ module( "ajax", {
1699
1705
1700
1706
//----------- jQuery.domManip()
1701
1707
1702
-
test("#11264 - jQuery.domManip() - no side effect because of ajaxSetup or global events",1,function(){
1708
+
test("#11264 - jQuery.domManip() - no side effect because of ajaxSetup or global events",function(){
1709
+
expect(1);
1710
+
1703
1711
jQuery.ajaxSetup({
1704
1712
type: "POST"
1705
1713
});
@@ -2086,7 +2094,9 @@ module( "ajax", {
2086
2094
2087
2095
//----------- jQuery.active
2088
2096
2089
-
test("jQuery.active",1,function(){
2097
+
test("jQuery.active",function(){
2098
+
expect(1);
2099
+
2090
2100
ok(jQuery.active===0,"ajax active counter should be zero: "+jQuery.active);
@@ -903,7 +907,9 @@ test("certain css values of 'normal' should be convertable to a number, see #862
903
907
904
908
// only run this test in IE9
905
909
if(document.documentMode===9){
906
-
test(".css('filter') returns a string in IE9, see #12537",1,function(){
910
+
test(".css('filter') returns a string in IE9, see #12537",function(){
911
+
expect(1);
912
+
907
913
equal(jQuery("<div style='-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFFFFF, endColorstr=#ECECEC)\";'></div>").css("filter"),"progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFFFFF, endColorstr=#ECECEC)","IE9 returns the correct value from css('filter').");
908
914
});
909
915
}
@@ -1111,7 +1117,9 @@ asyncTest( "Clearing a Cloned Element's Style Shouldn't Clear the Original Eleme
1111
1117
window.setTimeout(start,1000);
1112
1118
});
1113
1119
1114
-
test("show() after hide() should always set display to initial value (#14750)",1,function(){
1120
+
test("show() after hide() should always set display to initial value (#14750)",function(){
1121
+
expect(1);
1122
+
1115
1123
vardiv=jQuery("<div />"),
1116
1124
fixture=jQuery("#qunit-fixture");
1117
1125
@@ -1130,7 +1138,9 @@ test( "show() after hide() should always set display to initial value (#14750)",
1130
1138
exist="order"instyle||"WebkitOrder"instyle;
1131
1139
1132
1140
if(exist){
1133
-
test("Don't append px to CSS \"order\" value (#14049)",1,function(){
1141
+
test("Don't append px to CSS \"order\" value (#14049)",function(){
1142
+
expect(1);
1143
+
1134
1144
var$elem=jQuery("<div/>");
1135
1145
1136
1146
$elem.css("order",2);
@@ -1139,7 +1149,9 @@ test( "show() after hide() should always set display to initial value (#14750)",
1139
1149
}
1140
1150
})();
1141
1151
1142
-
test("Do not throw on frame elements from css method (#15098)",1,function(){
1152
+
test("Do not throw on frame elements from css method (#15098)",function(){
0 commit comments