generated from Seekra/repository-template
Feat(settings): add renderer for settings configuration #142
@@ -20,7 +20,7 @@ import { mount } from '@vue/test-utils';
|
|||||||
import { createI18n } from 'vue-i18n';
|
import { createI18n } from 'vue-i18n';
|
||||||
import { createMemoryHistory, createRouter } from 'vue-router';
|
import { createMemoryHistory, createRouter } from 'vue-router';
|
||||||
|
|
||||||
export const mountComponent = function mountComponent (component, options = {}, i18nMessages = {}, routes = []) {
|
export const mountComponent = function mountComponent (component, options = {}, i18nMessages = {}, routes = [], piniaOptions = {}) {
|
||||||
const i18n = createI18n({
|
const i18n = createI18n({
|
||||||
legacy: false,
|
legacy: false,
|
||||||
locale: 'en',
|
locale: 'en',
|
||||||
@@ -40,6 +40,7 @@ export const mountComponent = function mountComponent (component, options = {},
|
|||||||
i18n,
|
i18n,
|
||||||
router,
|
router,
|
||||||
createTestingPinia({
|
createTestingPinia({
|
||||||
|
...piniaOptions,
|
||||||
stubActions: false,
|
stubActions: false,
|
||||||
createSpy: vi.fn
|
createSpy: vi.fn
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user