style: format code using Prettier

This commit is contained in:
2026-08-09 13:09:39 +02:00
committed by Gitea
parent 6e0c14ac48
commit aecce32842
59 changed files with 9649 additions and 8795 deletions
+14 -15
View File
@@ -20,29 +20,32 @@ import { vi } from 'vitest';
import { createI18n } from 'vue-i18n';
import { createMemoryHistory, createRouter } from 'vue-router';
export const mountComponent = function mountComponent(component, options = {}, i18nMessages = {}, routes = [], piniaOptions = {}) {
const {
setupStores,
...testingPiniaOptions
} = piniaOptions;
export const mountComponent = function mountComponent(
component,
options = {},
i18nMessages = {},
routes = [],
piniaOptions = {},
) {
const { setupStores, ...testingPiniaOptions } = piniaOptions;
const i18n = createI18n({
legacy: false,
locale: 'en',
messages: {
en: i18nMessages
}
en: i18nMessages,
},
});
const router = createRouter({
history: createMemoryHistory(),
routes
routes,
});
const testingPinia = createTestingPinia({
...testingPiniaOptions,
stubActions: false,
createSpy: vi.fn
createSpy: vi.fn,
});
if (setupStores) {
@@ -51,12 +54,8 @@ export const mountComponent = function mountComponent(component, options = {}, i
return mount(component, {
global: {
plugins: [
i18n,
router,
testingPinia
],
plugins: [i18n, router, testingPinia],
},
...options
...options,
});
};