Skip to content

Commit

Permalink
chore: extract vitest config into separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
d-koppenhagen committed Mar 22, 2024
1 parent dd19e77 commit 286864d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
8 changes: 0 additions & 8 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import vue from "@vitejs/plugin-vue";
/// <reference types="vite/client" />
/// <reference types="vitest" />
import { fileURLToPath, URL } from "url";
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
Expand Down Expand Up @@ -153,10 +151,4 @@ export default defineConfig({
},
},
},
test: {
environment: "jsdom",
coverage: {
reporter: ["text", "json", "html"],
},
},
});
18 changes: 18 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -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"],
},
},
}),
);

0 comments on commit 286864d

Please sign in to comment.