mirror of
https://github.com/vrcx-team/VRCX.git
synced 2026-04-06 00:32:02 +02:00
fix vitest config
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -13,4 +13,4 @@ bun.lock
|
||||
AGENTS.md
|
||||
AI_GUIDE.md
|
||||
CLAUDE.md
|
||||
.coverage/
|
||||
coverage/
|
||||
@@ -12,14 +12,18 @@ const setString = vi.fn();
|
||||
const friends = ref([]);
|
||||
let routeName = 'not-tools';
|
||||
|
||||
vi.mock('vue-router', () => ({
|
||||
useRouter: () => ({ push }),
|
||||
useRoute: () => ({
|
||||
get name() {
|
||||
return routeName;
|
||||
}
|
||||
})
|
||||
}));
|
||||
vi.mock('vue-router', async (importOriginal) => {
|
||||
const actual = await importOriginal();
|
||||
return {
|
||||
...actual,
|
||||
useRouter: () => ({ push }),
|
||||
useRoute: () => ({
|
||||
get name() {
|
||||
return routeName;
|
||||
}
|
||||
})
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock('vue-i18n', () => ({
|
||||
useI18n: () => ({ t: (key) => key })
|
||||
|
||||
@@ -3,9 +3,10 @@ import { resolve } from 'node:path';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
plugins: [vue(),vueJsx()],
|
||||
define: {
|
||||
NIGHTLY: JSON.stringify(false),
|
||||
WINDOWS: JSON.stringify(true),
|
||||
|
||||
Reference in New Issue
Block a user