-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.ts
More file actions
31 lines (29 loc) · 996 Bytes
/
vitest.config.ts
File metadata and controls
31 lines (29 loc) · 996 Bytes
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
import path from "node:path";
import { fileURLToPath } from "node:url";
import { configDefaults, defineConfig } from "vitest/config";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
resolve: {
alias: {
// Resolve from source instead of dist for better mocking support (path relative to config for CI)
"@workglow/ai-provider/ollama": path.resolve(
__dirname,
"packages/ai-provider/src/provider-ollama/index.browser.ts"
),
},
},
envDir: __dirname,
test: {
setupFiles: ["./vitest.setup.ts"],
maxConcurrency: 1,
maxWorkers: 1,
testTimeout: 15000, // 15 second global timeout (WASM Postgres / PGlite init can be slow)
retry: 1,
exclude: [...configDefaults.exclude, "**/*.e2e.test.ts"],
coverage: {
provider: "v8", // or 'istanbul'
reporter: ["text", "json", "json-summary", "html"],
exclude: [...configDefaults.exclude, "packages/test/**"],
},
},
});