mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 11:27:50 +00:00
Tweak times in _.debounce and _.throttle unit tests.
Former-commit-id: d079ee2258151e126fd1c40efb9c01ee888170aa
This commit is contained in:
@@ -687,7 +687,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
asyncTest('should work with `maxWait` option', function() {
|
asyncTest('should work with `maxWait` option', function() {
|
||||||
var limit = 96,
|
var limit = 128,
|
||||||
withCount = 0,
|
withCount = 0,
|
||||||
withoutCount = 0;
|
withoutCount = 0;
|
||||||
|
|
||||||
@@ -2518,7 +2518,7 @@
|
|||||||
|
|
||||||
test('supports not passing a `max` argument', function() {
|
test('supports not passing a `max` argument', function() {
|
||||||
var actual = _.random(5),
|
var actual = _.random(5),
|
||||||
limit = 50,
|
limit = 60,
|
||||||
start = new Date;
|
start = new Date;
|
||||||
|
|
||||||
while ((new Date - start) < limit && actual == 5) {
|
while ((new Date - start) < limit && actual == 5) {
|
||||||
@@ -3136,8 +3136,8 @@
|
|||||||
|
|
||||||
asyncTest('should trigger trailing call when invoked repeatedly', function() {
|
asyncTest('should trigger trailing call when invoked repeatedly', function() {
|
||||||
var count = 0,
|
var count = 0,
|
||||||
limit = 48,
|
limit = 96,
|
||||||
throttled = _.throttle(function() { count++; }, 32),
|
throttled = _.throttle(function() { count++; }, 64),
|
||||||
start = new Date;
|
start = new Date;
|
||||||
|
|
||||||
while ((new Date - start) < limit) {
|
while ((new Date - start) < limit) {
|
||||||
|
|||||||
Reference in New Issue
Block a user