Skip to content

Commit

Permalink
updated _.delay test to use setTimeout to verify _.delay's behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
CatChen committed Jun 20, 2011
1 parent cf6cc16 commit b949d03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ $(document).ready(function() {
asyncTest("functions: delay", 2, function() {
var delayed = false;
_.delay(function(){ delayed = true; }, 100);
_.delay(function(){ ok(!delayed, "didn't delay the function quite yet"); }, 50);
_.delay(function(){ ok(delayed, 'delayed the function'); start(); }, 150);
setTimeout(function(){ ok(!delayed, "didn't delay the function quite yet"); }, 50);
setTimeout(function(){ ok(delayed, 'delayed the function'); start(); }, 150);
});

asyncTest("functions: defer", 1, function() {
Expand Down

0 comments on commit b949d03

Please sign in to comment.