Adjust _.throttle unit test.

Former-commit-id: 1cc461b62fb5ca20f2e623ab145f157a92d18fcf
This commit is contained in:
John-David Dalton
2012-10-30 08:10:40 -07:00
parent 08b1261c75
commit dfec6d9a6d

View File

@@ -1646,12 +1646,12 @@
var throttled = _.throttle(function() { var throttled = _.throttle(function() {
times.push(new Date - now); times.push(new Date - now);
}, 20); }, 40);
setTimeout(throttled, 20);
setTimeout(throttled, 20);
setTimeout(throttled, 40); setTimeout(throttled, 40);
setTimeout(throttled, 40); setTimeout(throttled, 40);
setTimeout(throttled, 80);
setTimeout(throttled, 80);
setTimeout(function() { setTimeout(function() {
var actual = _.every(times, function(value, index) { var actual = _.every(times, function(value, index) {
@@ -1662,7 +1662,7 @@
ok(actual); ok(actual);
QUnit.start(); QUnit.start();
}, 120); }, 260);
}); });
}()); }());