import { Store } from 'vuex' import VuexORM from "@vuex-orm/core"; import {mount, createLocalVue} from "@vue/test-utils" import {AnyJson} from "~/types/interfaces"; const localVue = createLocalVue() export function initLocalVue(ctx:AnyJson){ localVue.prototype.$nuxt = { context: ctx } } export function mountComposition(cb: () => any){ return mount( { setup() { return cb(); }, render(h) { return h('div'); } }, { localVue } ); } export function createStore(): Store { return new Store({ plugins: [VuexORM.install()], strict: true }) }