Skip to content

Commit 53c2997

Browse files
committed
Adds a stress test.
1 parent 79d576a commit 53c2997

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test/unit.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,29 @@ test( "error (callback not called)", function() {
7676
}
7777
});
7878
});
79+
80+
test( "stress test", function() {
81+
82+
var num = 20,
83+
count = num;
84+
85+
expect( num );
86+
stop();
87+
88+
for ( ; num ; num-- ) {
89+
$.jsonp({
90+
url: "http://gdata.youtube.com/feeds/api/users/julianaubourg?callback=?",
91+
success: function() {
92+
ok( true, "success" );
93+
},
94+
error: function() {
95+
ok( false, "error" );
96+
},
97+
complete: function() {
98+
if ( !( --count ) ) {
99+
start();
100+
}
101+
}
102+
});
103+
}
104+
});

0 commit comments

Comments
 (0)