diff options
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/AppHeader.spec.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/unit/AppHeader.spec.js b/tests/unit/AppHeader.spec.js index ed78f033..2d17e768 100644 --- a/tests/unit/AppHeader.spec.js +++ b/tests/unit/AppHeader.spec.js @@ -16,7 +16,15 @@ describe('AppHeader.vue', () => { 'global/getSystemInfo': jest.fn(), }; - const store = new Vuex.Store({ actions }); + // VueX requires that all modules be present, even if they aren't used + // in the test, so invent a Fake auth module and install it. + const modules = { + authentication: { + namespaced: true, + }, + }; + + const store = new Vuex.Store({ actions, modules }); const wrapper = mount(AppHeader, { store, localVue, |