Ensure wait of _.debounce and _.throttle defaults to 0. [closes #991]

This commit is contained in:
jdalton
2015-02-23 08:28:02 -08:00
parent 6840b2cfe5
commit 44006142c7
2 changed files with 25 additions and 3 deletions

View File

@@ -13889,6 +13889,28 @@
ok(pass);
});
asyncTest('_.' + methodName + ' should have a default `wait` of `0`', 1, function() {
if (!(isRhino && isModularize)) {
var callCount = 0;
var funced = func(function() {
callCount++;
});
funced();
setTimeout(function() {
funced();
strictEqual(callCount, isDebounce ? 1 : 2);
QUnit.start();
}, 32);
}
else {
skipTest();
QUnit.start();
}
});
asyncTest('_.' + methodName + ' should call `func` with the correct `this` binding', 1, function() {
if (!(isRhino && isModularize)) {
var object = {