Files
oh-my-pi/packages/catalog/test/models-lazy-provider-cache.test.ts
T
roboomp cc04600a64 test(ai,catalog): give spawn-based lazy tests explicit timeouts
Spawn-based lazy-loading tests assert exitCode===0 on a child process but
set no per-test timeout, so bun's 5s default kills the child under CPU
contention and the assertion reports a dead child rather than a regression.

Give each spawn test an explicit 60s per-test timeout, matching the
existing precedent in auth-gateway-anthropic-caching.test.ts.

Fixes #7018

(cherry picked from commit 00e5ec8855eb8ba31c1bdf571bd7c16f2405d679)
2026-07-29 23:09:06 +02:00

12 lines
352 B
TypeScript

import { expect, test } from "bun:test";
const FIXTURE = `${import.meta.dir}/fixtures/models-lazy-provider-cache.ts`;
test("bundled models are enriched one provider at a time", () => {
const result = Bun.spawnSync({
cmd: [process.execPath, FIXTURE],
env: process.env,
});
expect(result.exitCode, result.stderr.toString()).toBe(0);
}, 60_000);