diff --git a/vite.config.ts b/vite.config.ts
index 4d7ba104..e16e8ef0 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,6 +1,4 @@
import vue from "@vitejs/plugin-vue";
-///
-///
import { fileURLToPath, URL } from "url";
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
@@ -153,10 +151,4 @@ export default defineConfig({
},
},
},
- test: {
- environment: "jsdom",
- coverage: {
- reporter: ["text", "json", "html"],
- },
- },
});
diff --git a/vitest.config.ts b/vitest.config.ts
new file mode 100644
index 00000000..fba73ffd
--- /dev/null
+++ b/vitest.config.ts
@@ -0,0 +1,18 @@
+import { fileURLToPath } from "node:url";
+import { mergeConfig, defineConfig, configDefaults } from "vitest/config";
+import viteConfig from "./vite.config";
+
+export default mergeConfig(
+ viteConfig,
+ defineConfig({
+ test: {
+ environment: "jsdom",
+ exclude: [...configDefaults.exclude, "tests/*"],
+ root: fileURLToPath(new URL("./", import.meta.url)),
+ coverage: {
+ provider: "v8",
+ reporter: ["text", "json", "html"],
+ },
+ },
+ }),
+);