-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathvitest.config.ts
More file actions
35 lines (34 loc) · 1 KB
/
Copy pathvitest.config.ts
File metadata and controls
35 lines (34 loc) · 1 KB
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
34
35
import { defineConfig } from "vitest/config"
import react from "@vitejs/plugin-react"
export default defineConfig({
// eslint-disable-next-line @typescript-eslint/no-explicit-any
plugins: [react()] as any,
test: {
globals: true,
setupFiles: ["./vitest.setup.ts"],
exclude: ["**/node_modules/**", "**/.reference/**"],
include: ["src/**/*.{test,spec}.{ts,tsx}"],
fileParallelism: false,
typecheck: {
enabled: true,
include: ["src/**/*.{test,spec}.{ts,tsx}"],
tsconfig: "./tsconfig.vitest.json",
},
},
resolve: {
alias: {
"astro:env/server": new URL(
"./test-stubs/astro-env-server.ts",
import.meta.url,
).pathname,
"astro:env/client": new URL(
"./test-stubs/astro-env-client.ts",
import.meta.url,
).pathname,
"#app": new URL("./src/app", import.meta.url).pathname,
"#server": new URL("./src/server", import.meta.url).pathname,
"#shared": new URL("./src/shared", import.meta.url).pathname,
"#www": new URL("./src/www", import.meta.url).pathname,
},
},
})