Skip to content

Commit

Permalink
Assert the callback was called.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Mar 7, 2019
1 parent fed9765 commit d48336d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/unit/debounce.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

// NOTE: This is a regression test; the bug it fixed only occured if the
// debouncer was flushed before any microtasks run, hence it should be
// first in this file.
// first in this file
test('re-enqueue canceled debouncer', function() {
const cb = sinon.spy();
let db;
Expand All @@ -51,6 +51,8 @@
assert.equal(cb.callCount, 0);
db = Debouncer.debounce(db, microTask, cb);
enqueueDebouncer(db);
flush();
assert.isTrue(cb.calledOnce);
});

const testEnqueue = (shouldFlush, done) => {
Expand Down

0 comments on commit d48336d

Please sign in to comment.