forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.mts
More file actions
47 lines (45 loc) · 1.23 KB
/
Copy pathvitest.config.mts
File metadata and controls
47 lines (45 loc) · 1.23 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
/// <reference types="vitest" />
import { defineConfig } from "vite";
import angular from "@analogjs/vite-plugin-angular";
import { fileURLToPath } from "node:url";
import { dirname, resolve } from "node:path";
const __dirname = dirname(fileURLToPath(import.meta.url));
const r = (...p: string[]) => resolve(__dirname, ...p);
export default defineConfig(({ mode }) => ({
plugins: [angular()],
resolve: {
dedupe: [
"@angular/core",
"@angular/common",
"@angular/platform-browser",
"@angular/platform-browser-dynamic",
"@angular/compiler",
"@angular/core/testing",
],
},
test: {
globals: true,
environment: "jsdom",
setupFiles: [r("src/test-setup.ts")], // Use absolute path
include: ["src/**/*.{spec,test}.{ts,tsx}"],
pool: "threads",
poolOptions: { threads: { singleThread: true } },
reporters: [["default", { summary: false }]],
silent: true,
coverage: {
provider: "v8",
reporter: ["text", "json", "html"],
exclude: [
"node_modules/",
"dist/",
"*.config.*",
"src/test-setup.ts",
"src/index.ts",
"src/public-api.ts",
],
},
},
define: {
"import.meta.vitest": mode !== "production",
},
}));