-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Expand file tree
/
Copy pathvitest.e2e-live.config.ts
More file actions
41 lines (40 loc) · 1.75 KB
/
Copy pathvitest.e2e-live.config.ts
File metadata and controls
41 lines (40 loc) · 1.75 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
import { defineConfig } from "vitest/config";
import path from "path";
/**
* Live-server E2E suites (`tests/e2e/ecosystem.test.ts`,
* `tests/e2e/protocol-clients.test.ts`).
*
* These are the only two suites that drive a REAL running OmniRoute over HTTP
* rather than importing modules. Their runners — `scripts/dev/run-ecosystem-tests.mjs`
* and `scripts/dev/run-protocol-clients-tests.mjs` — boot a dev server, wait for
* `/api/monitoring/health`, then invoke Vitest with this config.
*
* They need their own config because `vitest.config.ts` deliberately EXCLUDES both
* files (they must not run in the jsdom UI job, which has no server). Since the
* runners previously invoked Vitest with no `--config`, they loaded that default
* config and the exclusion discarded the very file passed as the positional filter —
* so both scripts failed with "No test files found, exiting with code 1" and neither
* suite had a way to execute.
*/
export default defineConfig({
test: {
// Real HTTP against a running server — never jsdom.
environment: "node",
globals: true,
include: ["tests/e2e/ecosystem.test.ts", "tests/e2e/protocol-clients.test.ts"],
exclude: ["**/node_modules/**", "**/.git/**"],
// Both suites share ONE server instance, so files must not run concurrently.
fileParallelism: false,
// Upstream calls over the network are slower than in-process unit tests; the
// suites themselves also read ECOSYSTEM_*_TIMEOUT_MS for their per-case budgets.
testTimeout: 60000,
hookTimeout: 60000,
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
// Mirrors tsconfig paths, same as the other two vitest configs.
"@omniroute/open-sse": path.resolve(__dirname, "./open-sse"),
},
},
});