diff --git a/test/store/index.js b/test/store/index.js index e3c024e4d5..fd84322d35 100644 --- a/test/store/index.js +++ b/test/store/index.js @@ -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({