Skip to content

Commit acda1d6

Browse files
committed
[WIP]: review 1 (squash it!)
1 parent 11d0627 commit acda1d6

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

test/unit/basic.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ if ( jQuery.ajax ) {
66
test( "ajax", function( assert ) {
77
expect( 4 );
88

9-
var requestsLeft = 3;
10-
11-
stop();
9+
var done = assert.async(),
10+
requestsLeft = 3;
1211

1312
jQuery.ajax({
1413
type: "GET",
@@ -17,7 +16,7 @@ test( "ajax", function( assert ) {
1716
assert.strictEqual( msg, "bar", "Check for GET" );
1817
requestsLeft--;
1918
if ( !requestsLeft ) {
20-
start();
19+
done();
2120
}
2221
}
2322
});
@@ -30,7 +29,7 @@ test( "ajax", function( assert ) {
3029
strictEqual( msg, "pan", "Check for POST" );
3130
requestsLeft--;
3231
if ( !requestsLeft ) {
33-
start();
32+
done();
3433
}
3534
}
3635
});
@@ -40,7 +39,7 @@ test( "ajax", function( assert ) {
4039
"Check if content was injected into the DOM" );
4140
requestsLeft--;
4241
if ( !requestsLeft ) {
43-
start();
42+
done();
4443
}
4544
});
4645
} );
@@ -113,8 +112,8 @@ test( "core", function ( assert ) {
113112
assert.strictEqual( jQuery.inArray( 3, [ "a", 6, false, "3", {} ] ), -1, "jQuery.inArray - false" );
114113

115114
assert.strictEqual( elem.get( 1 ), elem[ 1 ], ".get" );
116-
assert.strictEqual( elem.first()[ 0 ], elem.get( 0 ), ".first" );
117-
assert.strictEqual( elem.last()[ 0 ], elem.get( 1 ), ".last" );
115+
assert.strictEqual( elem.first()[ 0 ], elem[ 0 ], ".first" );
116+
assert.strictEqual( elem.last()[ 0 ], elem[ 1 ], ".last" );
118117

119118
assert.deepEqual( jQuery.map( [ "a", "b", "c" ], function ( v, k ) {
120119
return k + v;
@@ -267,5 +266,3 @@ test( "wrap", function ( assert ) {
267266
assert.strictEqual( elem.html(), "<i><a><span><em><b></b></em></span></a><a></a></i>", ".wrapAll" );
268267

269268
} );
270-
271-
// TODO write tests for traversing & wrap.

0 commit comments

Comments
 (0)