Merge pull request #2291 from jakemac53/isDebouncerActive

make isDebouncerActive actually return a bool
This commit is contained in:
Kevin Schaaf 2016-02-04 11:43:50 -08:00
commit e81145c114

View File

@ -66,9 +66,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
called++; called++;
}; };
assert(window.el1.isDebouncerActive('foo') === false);
window.el1.debounce('foo', cb); window.el1.debounce('foo', cb);
window.el1.debounce('foo', cb); window.el1.debounce('foo', cb);
window.el1.debounce('foo', cb); window.el1.debounce('foo', cb);
assert(window.el1.isDebouncerActive('foo') === true);
setTimeout(function() { setTimeout(function() {
assert.equal(called, 1, 'debounce should be called exactly once'); assert.equal(called, 1, 'debounce should be called exactly once');