forked from sqwu/helper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.mts
More file actions
34 lines (32 loc) · 1.04 KB
/
vitest.config.mts
File metadata and controls
34 lines (32 loc) · 1.04 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
import tsconfigPaths from "vite-tsconfig-paths";
import { defineConfig } from "vitest/config";
const isEvals = process.env.EVALITE === "true";
const include = isEvals ? [] : ["tests/**/*.{test,spec}.?(c|m)[jt]s?(x)"];
const setupFiles = isEvals ? ["./tests/evals/support/setup.ts"] : ["./tests/support/setup.ts"];
const globalSetup = isEvals ? [] : ["./tests/support/globalSetup.ts"];
export default defineConfig({
plugins: [tsconfigPaths()],
test: {
exclude: ["**/node_modules/**", "**/dist/**", "**/.next/**", "**/e2e/**"],
coverage: {
provider: "v8",
},
server: {
deps: {
cacheDir: ".cache/.vitest",
// tRPC imports next/navigation without an extension, causing a similar error to this https://github.com/nextauthjs/next-auth/discussions/9385
inline: ["@trpc/server"],
},
},
passWithNoTests: true,
watch: false,
fileParallelism: false,
testTimeout: isEvals ? 1000000 : 10000,
sequence: {
concurrent: false,
},
include,
setupFiles,
globalSetup,
},
});