There was no test to determine if onchange cancel threw an error

pull/1178/head
Gareth Oates 7 years ago
parent 7d44b181f2
commit 389b5c9ff9

@ -113,6 +113,15 @@ describe('store', () => {
});
});
it('allows user to cancel state change callback', () => {
const store = new Store();
const handler = store.onchange(() => {});
assert.doesNotThrow(() => {
handler.cancel();
}, TypeError, 'this._changeHandlers is undefined');
});
describe('computed', () => {
it('computes a property based on data', () => {
const store = new Store({

Loading…
Cancel
Save