|
@@ -80,6 +80,17 @@ describe('Modules', () => {
|
|
store.commit('a/foo')
|
|
store.commit('a/foo')
|
|
expect(mutationSpy).toHaveBeenCalled()
|
|
expect(mutationSpy).toHaveBeenCalled()
|
|
})
|
|
})
|
|
|
|
+ it('dynamic module existance test', () => {
|
|
|
|
+ const store = new Vuex.Store({
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ store.registerModule('bonjour', {
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ expect(store.hasModule('bonjour')).toBe(true)
|
|
|
|
+ store.unregisterModule('bonjour')
|
|
|
|
+ expect(store.hasModule('bonjour')).toBe(false)
|
|
|
|
+ })
|
|
|
|
|
|
it('dynamic module registration preserving hydration', () => {
|
|
it('dynamic module registration preserving hydration', () => {
|
|
const store = new Vuex.Store({})
|
|
const store = new Vuex.Store({})
|