Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var activatedSpy = sinon.spy(function() {}),
deactivatedSpy = sinon.spy(function() {});
var button = simpleMode._node;
eventBus.on('simpleMode.activated', activatedSpy);
eventBus.on('simpleMode.deactivated', deactivatedSpy);
// when
mouseEvent('click', button);
// then
expect(deactivatedSpy).to.have.been.called;
// when
mouseEvent('click', button);
// then
expect(activatedSpy).to.have.been.called;
}));