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

pull/7738/head
Gareth Oates 9 years ago
parent 566f64d436
commit 92cb77f8da

@ -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