Files
reverse-engineering-anything/tests/boundary/mcp/wideOccurrenceCompletion.test.ts
T
84990f9777 test: remove fixed child-process deadlines from tests
239 literal timeoutMs values on cli.run and processes.run only restated
a guess at host speed. On hosted runners with four workers, cliOutput's
3-second value failed while the command still produced correct output.
Deadlines that are the behavior under test, derived from an operation
budget, or that bound a regression's wait remain.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 13:21:13 +08:00

30 lines
973 B
TypeScript

import { fileURLToPath } from "node:url";
import { expect } from "vitest";
import { processTest } from "../../support/process/processFixture.js";
processTest.for([3, 130_000])(
"completes an authenticated inventory with %i child occurrences on the server stack",
async (count, { processes }) => {
// Thread-pool tests have a larger stack than the stdio server. Use a fresh
// main thread and enough heap for the ledger's conservative admission.
const result = await processes.run(process.execPath, [
"--max-old-space-size=4096",
"--import",
"tsx",
fileURLToPath(
new URL(
"../../fixtures/promptOccurrenceCompletion.ts",
import.meta.url,
),
),
String(count),
]);
expect(result.exitCode, result.stderr).toBe(0);
expect(JSON.parse(result.stdout)).toMatchObject({
values: Math.min(count + 1, 100),
total: count + 1,
hasMore: count + 1 > 100,
});
},
);