summaryrefslogtreecommitdiff
path: root/tests/unit/AppNavigation.spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/AppNavigation.spec.js')
-rw-r--r--tests/unit/AppNavigation.spec.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/unit/AppNavigation.spec.js b/tests/unit/AppNavigation.spec.js
index b37c1e4c..ce410c8d 100644
--- a/tests/unit/AppNavigation.spec.js
+++ b/tests/unit/AppNavigation.spec.js
@@ -1,16 +1,25 @@
-import { mount, createWrapper } from '@vue/test-utils';
+import { mount, createLocalVue, createWrapper } from '@vue/test-utils';
import AppNavigation from '@/components/AppNavigation';
import Vue from 'vue';
+import Vuex from 'vuex';
import VueRouter from 'vue-router';
import { BootstrapVue } from 'bootstrap-vue';
+const localVue = createLocalVue();
+localVue.use(Vuex);
+
describe('AppNavigation.vue', () => {
let wrapper;
+ const router = new VueRouter();
+ const actions = {
+ 'global/userPrivilege': jest.fn(),
+ };
+ const store = new Vuex.Store({ actions });
Vue.use(BootstrapVue);
Vue.use(VueRouter);
- const router = new VueRouter();
wrapper = mount(AppNavigation, {
+ store,
router,
mocks: {
$t: (key) => key,