-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.mts
More file actions
33 lines (32 loc) · 802 Bytes
/
vitest.config.mts
File metadata and controls
33 lines (32 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import path from "node:path";
import swc from "unplugin-swc";
import { defineConfig } from "vitest/config";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
test: {
globals: true,
root: "./",
setupFiles: [path.join(__dirname, "./scripts/setup-tests.ts")],
coverage: {
provider: "v8",
reporter: ["text", "lcov"],
include: ["src/**/*.ts"],
exclude: [
"**/index.ts",
"**/*.types.ts",
"**/*types.ts",
"**/*.type.ts",
"tests/**",
"types/**",
"**/__tests__/**",
],
},
},
plugins: [
tsconfigPaths(),
swc.vite({
// Explicitly set the module type to avoid inheriting this value from a `.swcrc` config file
module: { type: "es6" },
}),
],
});