Files
Codeman/vitest.config.ts
T
Devvyn ef2001b1c1 fix(test): make a bare vitest invocation use the isolated CI config
`npx vitest run` with no --config found no config file, so test/setup.ts never ran and HOME
was not redirected: the suite wrote fixtures (clis.json with a test entry, users.json,
webhook.json, intents.json, .env, settings.json values) into the developer's real ~/.codeman,
and a running Codeman then loaded them on its next restart.

A root vitest.config.ts re-exports config/vitest.ci.config.ts, so the default invocation is the
isolated one; npm test and the browser/mobile/perf scripts keep passing their own --config. The
shared temp-HOME teardown also retries on ENOTEMPTY, which failed whole files intermittently
after every test had passed.
2026-10-17 05:07:25 +08:00

9 lines
536 B
TypeScript

/**
* Bare `vitest` / `npx vitest run` (no `--config`) resolves THIS file. Without it there is no
* config at all, so no `setupFiles`: `test/setup.ts` never runs, HOME is not redirected, and the
* suite reads and writes the developer's real `~/.codeman` (settings, clis.json, users.json,
* .env, ...). It points at the CI gate so the default invocation is always the isolated one;
* `npm test`, `test:browser`, `test:mobile` and `test:perf` still pass their own `--config`.
*/
export { default } from './config/vitest.ci.config';