mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Adjust _.throttle unit test.
Former-commit-id: 1cc461b62fb5ca20f2e623ab145f157a92d18fcf
This commit is contained in:
@@ -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);
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user