Files
OmniRoute/vitest.e2e-live.config.ts
Arnav Rastogi 397ec88751 fix(ci): repair and wire the two live-server E2E suites (#10050)
tests/e2e/ecosystem.test.ts and tests/e2e/protocol-clients.test.ts appear in the
AGENTS.md test matrix but ran in no workflow, and could not run at all: both are
listed in vitest.config.ts include AND exclude, and their runners invoked Vitest
without --config, so the default config's exclusion discarded the very file each
passed as a positional filter.

  No test files found, exiting with code 1
  filter: tests/e2e/ecosystem.test.ts

Add vitest.e2e-live.config.ts covering only these two suites, point both runners
at it, and drop the contradictory include entries. The exclusions stay: these
drive a real server and must never run in the jsdom UI job.

Wire both into CI. test-ecosystem is blocking (20/20 green). test-protocols-e2e
is advisory pending #10049 — restoring it surfaced a pre-existing discrepancy
where GET /api/mcp/audit answers 403 over loopback against an expected 200|401.
2026-08-13 07:52:22 -03:00

42 lines
1.8 KiB
TypeScript

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"),
},
},
});