-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.ts
More file actions
executable file
·66 lines (63 loc) · 3.93 KB
/
Copy pathvitest.config.ts
File metadata and controls
executable file
·66 lines (63 loc) · 3.93 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/// <reference types="vitest" />
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import * as path from "path";
export default defineConfig({
plugins: [react()],
resolve: {
alias: [
// Main repository paths
{ find: "@", replacement: path.resolve(__dirname, "./workstation/frontend/src") },
{ find: "@orpheus/utils", replacement: path.resolve(__dirname, "./workstation/frontend/src/services/utils") },
{ find: "@orpheus/components", replacement: path.resolve(__dirname, "./workstation/frontend/src/components") },
{ find: "@orpheus/services", replacement: path.resolve(__dirname, "./workstation/frontend/src/services") },
{ find: "@orpheus/screens", replacement: path.resolve(__dirname, "./workstation/frontend/src/screens") },
{ find: "@orpheus/contexts", replacement: path.resolve(__dirname, "./workstation/frontend/src/contexts") },
{ find: "@orpheus/types", replacement: path.resolve(__dirname, "./workstation/frontend/src/types") },
{ find: "@orpheus/types/core", replacement: path.resolve(__dirname, "./workstation/frontend/src/types/core") },
{ find: "@orpheus/test", replacement: path.resolve(__dirname, "./workstation/frontend/src/test") },
{ find: "@orpheus/widgets", replacement: path.resolve(__dirname, "./workstation/frontend/src/components/widgets") },
{ find: "@orpheus/workstation", replacement: path.resolve(__dirname, "./workstation/frontend/src/screens/workstation") },
{ find: "@orpheus", replacement: path.resolve(__dirname, "./workstation/frontend/src") },
// OEW-main submodule paths
{ find: "@oew-main", replacement: path.resolve(__dirname, "./workstation/frontend/OEW-main/src") },
{ find: "@oew-main/utils", replacement: path.resolve(__dirname, "./workstation/frontend/OEW-main/src/services/utils") },
{ find: "@oew-main/components", replacement: path.resolve(__dirname, "./workstation/frontend/OEW-main/src/components") },
{ find: "@oew-main/services", replacement: path.resolve(__dirname, "./workstation/frontend/OEW-main/src/services") },
{ find: "@oew-main/screens", replacement: path.resolve(__dirname, "./workstation/frontend/OEW-main/src/screens") },
{ find: "@oew-main/contexts", replacement: path.resolve(__dirname, "./workstation/frontend/OEW-main/src/contexts") },
{ find: "@oew-main/types", replacement: path.resolve(__dirname, "./workstation/frontend/OEW-main/src/types") },
{ find: "@oew-main/test", replacement: path.resolve(__dirname, "./workstation/frontend/OEW-main/src/test") },
{ find: "@oew-main/widgets", replacement: path.resolve(__dirname, "./workstation/frontend/OEW-main/src/components/widgets") },
{ find: "@oew-main/workstation", replacement: path.resolve(__dirname, "./workstation/frontend/OEW-main/src/screens/workstation") },
// Cross-module imports (to fix symbolic link issues)
{ find: "@orpheus/oew-main/contexts", replacement: path.resolve(__dirname, "./workstation/frontend/OEW-main/src/contexts") },
{ find: "@orpheus/oew-main/types/core", replacement: path.resolve(__dirname, "./workstation/frontend/OEW-main/src/types/core") }
]
},
test: {
environment: "jsdom",
include: [
"workstation/frontend/src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}",
"workstation/frontend/OEW-main/src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"
],
globals: true,
setupFiles: ["workstation/frontend/OEW-main/src/setupTests.ts"],
coverage: {
reporter: ["text", "json", "html"],
reportsDirectory: "./test-results/coverage",
},
outputFile: {
html: "./test-results/html/index.html",
},
reporters: ["default", "html"],
deps: {
inline: ["jest-image-snapshot"],
},
exclude: ["**/node_modules/**", "**/__snapshots__/**"],
testTimeout: 10000, // Increased timeout for visual tests
snapshotFormat: {
printBasicPrototype: true,
},
},
});