remove dead debounce test assertion

This commit is contained in:
Stefan Grönke 2015-07-30 19:50:04 +02:00 committed by Daniel Freedman
parent d468949bb8
commit 9b898c25cc

View File

@ -57,6 +57,44 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
});
suite('debounce', function() {
test('debounce (no-wait)', function(done) {
var called = 0;
var cb = function() {
called++;
};
window.el1.debounce('foo', cb);
window.el1.debounce('foo', cb);
window.el1.debounce('foo', cb);
setTimeout(function() {
assert.equal(called, 1, 'debounce should be called exactly once');
done();
}, 50);
});
test('debounce (wait)', function(done) {
var called = 0;
var cb = function() {
called++;
};
window.el1.debounce('foo', cb);
window.el1.debounce('foo', cb, 100);
setTimeout(function() {
assert.equal(called, 1, 'debounce should be called exactly once');
done();
}, 200);
});
});
</script>
</body>