Add default wait test for _.delay.

This commit is contained in:
John-David Dalton
2016-01-08 21:32:42 -08:00
parent 11538ccf90
commit 17a1663513

View File

@@ -4094,6 +4094,25 @@
}, 64);
});
QUnit.test('should use a default `wait` of `0`', function(assert) {
assert.expect(2);
var done = assert.async();
var pass = false;
_.delay(function() {
pass = true;
});
assert.notOk(pass);
setTimeout(function() {
assert.ok(pass);
done();
}, 0);
});
QUnit.test('should be cancelable', function(assert) {
assert.expect(1);