mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
remove dead debounce test assertion
This commit is contained in:
parent
d468949bb8
commit
9b898c25cc
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user