Files
iios/vitest.config.ts
T
maaz519 9c6e2c76e8 fix(support): agent-demo self-seeds (join default queue + go online); tickets always get a queue
Root cause of 'waiting for escalations': no queue/membership meant tickets were
never assigned. Now: createTicket find-or-creates a default queue; new joinDefault
endpoint + useGoOnline hook; agent-demo joins+goes-AVAILABLE on load (assignPending
picks up any waiting ticket). smoke-support self-seeds (no seed script needed).
Also: vitest singleFork to end cross-file DB races (45 tests deterministic).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 12:39:14 +05:30

26 lines
956 B
TypeScript

import { defineConfig } from 'vitest/config';
import { fileURLToPath } from 'node:url';
const r = (p: string) => fileURLToPath(new URL(p, import.meta.url));
export default defineConfig({
resolve: {
alias: {
// Resolve workspace packages to their TS source so tests run without a
// build step. Production builds still go through tsc/dist.
'@insignia/iios-contracts': r('./packages/iios-contracts/src/index.ts'),
'@insignia/iios-testkit': r('./packages/iios-testkit/src/index.ts'),
},
},
test: {
include: ['packages/**/src/**/*.{test,spec}.ts', 'test/**/*.{test,spec}.ts'],
// DB-backed specs share one Postgres and TRUNCATE between tests. Run every
// file in a single worker process, sequentially, so there is no cross-file
// race on the shared database.
fileParallelism: false,
sequence: { concurrent: false },
pool: 'forks',
poolOptions: { forks: { singleFork: true } },
},
});