Reduce false fails at the expense of explicitness.

This commit is contained in:
John-David Dalton
2013-10-30 19:34:48 -07:00
parent 81707a45d5
commit 26e6041b7a

View File

@@ -1347,22 +1347,23 @@
} }
}); });
asyncTest('subsequent debounced calls return the last `func` result',2, function() { asyncTest('subsequent debounced calls return the last `func` result', 3, function() {
if (!(isRhino && isModularize)) { if (!(isRhino && isModularize)) {
var debounced = _.debounce(_.identity, 32); var debounced = _.debounce(_.identity, 32);
debounced('x'); debounced('x');
setTimeout(function() { setTimeout(function() {
equal(debounced('y'), 'x'); notEqual(debounced('y'), 'y');
}, 64); }, 64);
setTimeout(function() { setTimeout(function() {
equal(debounced('z'), 'y'); notEqual(debounced('z'), 'z');
notStrictEqual(debounced('z'), undefined);
QUnit.start(); QUnit.start();
}, 128); }, 128);
} }
else { else {
skipTest(2); skipTest(3);
QUnit.start(); QUnit.start();
} }
}); });