forked from chrisdoc/hevy-mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
44 lines (43 loc) · 1.09 KB
/
Copy pathvitest.config.ts
File metadata and controls
44 lines (43 loc) · 1.09 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
import { fileURLToPath } from "node:url";
import { configDefaults, defineConfig } from "vitest/config";
export default defineConfig({
resolve: {
alias: {
// @cloudflare/workers-oauth-provider imports this Workers runtime
// module; outside workerd it needs a shim.
"cloudflare:workers": fileURLToPath(
new URL("./tests/shims/cloudflare-workers.ts", import.meta.url).href,
),
},
},
test: {
setupFiles: [
fileURLToPath(
new URL("./tests/setup/cloudflare-runtime.ts", import.meta.url).href,
),
],
server: {
deps: {
// Inline so the `cloudflare:workers` alias above applies to the
// library's own import of that runtime-only module.
inline: ["@cloudflare/workers-oauth-provider"],
},
},
exclude: [
...configDefaults.exclude,
"tests/nightly/**",
"tests/cloudflare/**",
],
coverage: {
provider: "v8",
reportsDirectory: "coverage",
reporter: ["text", "lcov"],
exclude: [
...(configDefaults.coverage.exclude ?? []),
"tests/performance/**",
"tests/fixtures/**",
"packages/hevy-client/src/generated/**",
],
},
},
});