-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathvitest.config.mjs
More file actions
47 lines (44 loc) · 1.05 KB
/
vitest.config.mjs
File metadata and controls
47 lines (44 loc) · 1.05 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
36
37
38
39
40
41
42
43
44
45
46
47
// vitest.config.mjs
import { fileURLToPath } from "node:url";
import { defineConfig } from "vitest/config";
const projectRoot = fileURLToPath(new URL(".", import.meta.url));
const nextNavigationMock = fileURLToPath(
new URL("./__tests__/helpers/nextNavigation.ts", import.meta.url),
);
export default defineConfig({
resolve: {
alias: {
"@": projectRoot,
"next/navigation": nextNavigationMock,
},
},
test: {
testTimeout: 300000,
environment: "jsdom",
env: {
BETTER_AUTH_URL: "http://localhost:3000",
BETTER_AUTH_SECRET: "test-secret-at-least-32-characters-long",
},
// setupFiles: ['./vitest.setup.ts'],
coverage: {
provider: "v8",
reporter: ["text", "json-summary"],
include: [
"lib/**/*.ts",
"app/**/*.ts",
"app/**/*.tsx",
"components/**/*.tsx",
"proxy.ts",
],
exclude: [
"**/*.test.*",
"**/__tests__/**",
"**/generated/**",
"lib/db.ts",
],
},
sequence: {
concurrency: 1,
},
},
});