mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
updated _.delay test to use setTimeout to verify _.delay's behavior
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user