mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 11:57:49 +00:00
Avoid false fail for a _.throttle test in some VMs.
This commit is contained in:
12
test/test.js
12
test/test.js
@@ -6790,7 +6790,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
asyncTest('subsequent calls should return the result of the first call', 2, function() {
|
asyncTest('subsequent calls should return the result of the first call', 5, function() {
|
||||||
if (!(isRhino && isModularize)) {
|
if (!(isRhino && isModularize)) {
|
||||||
var throttled = _.throttle(function(value) { return value; }, 32),
|
var throttled = _.throttle(function(value) { return value; }, 32),
|
||||||
result = [throttled('x'), throttled('y')];
|
result = [throttled('x'), throttled('y')];
|
||||||
@@ -6799,12 +6799,18 @@
|
|||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var result = [throttled('a'), throttled('b')];
|
var result = [throttled('a'), throttled('b')];
|
||||||
deepEqual(result, ['a', 'a']);
|
|
||||||
|
notEqual(result[0], 'x');
|
||||||
|
notStrictEqual(result[0], undefined);
|
||||||
|
|
||||||
|
notEqual(result[1], 'b');
|
||||||
|
notStrictEqual(result[1], undefined);
|
||||||
|
|
||||||
QUnit.start();
|
QUnit.start();
|
||||||
}, 128);
|
}, 128);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
skipTest(2);
|
skipTest(5);
|
||||||
QUnit.start();
|
QUnit.start();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user