mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
make destroy reflow test more strict
validate that the listener is not being properly removed
This commit is contained in:
parent
42f404a8a9
commit
8e881e5f14
1 changed files with 4 additions and 1 deletions
|
@ -156,9 +156,12 @@ define(function (require) {
|
|||
|
||||
describe('#destroy()', function () {
|
||||
it('removes the "reflow" event from the reflowWatcher', function () {
|
||||
var onCall = reflowSpies.on.getCall(0);
|
||||
var handler = onCall.args[1];
|
||||
|
||||
checker.destroy();
|
||||
expect(reflowSpies.off).to.have.property('callCount', 1);
|
||||
expect(reflowSpies.off.calledWith('reflow')).to.be.ok();
|
||||
expect(reflowSpies.off.calledWith('reflow', handler)).to.be.ok();
|
||||
});
|
||||
|
||||
it('clears the timeout', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue