Files
reverse-engineering-anything/src/process/DarwinProcessRunTokenReader.timeout.test.ts
T
morluto 5044e20171 test: focus diagnostics and evidence checks on behavior (#9303)
* test: focus configuration diagnostics on their owners

Preserve shape errors, selected paths, recovery guidance, and unchanged-file behavior across parser, setup, and uninstall boundaries.

* test: focus artifact and evidence checks on behavior

Retain format, identity, malformed-input, and cleanup coverage while removing fixed prose and closing the admitted test source.

* refactor(debugger): use configured session admission limits

* test: focus evidence and diagnostics on behavior

* fix(test): restore verifier export and formatting

* test(config): verify debugger limit ranges

* test(rizin): keep fixture executable authoritative

* test(rizin): isolate debugger fixture environment
2026-11-08 16:39:20 +00:00

35 lines
1.0 KiB
TypeScript

import { describe, expect, it } from "vitest";
import { resolveSwiftcCompileTimeoutMs } from "./DarwinProcessRunTokenReader.js";
describe("resolveSwiftcCompileTimeoutMs", () => {
it("keeps the historical default when unset", () => {
expect(resolveSwiftcCompileTimeoutMs({ environment: {} })).toBe(120_000);
});
it("prefers an explicit compileTimeoutMs over the environment", () => {
expect(
resolveSwiftcCompileTimeoutMs({
compileTimeoutMs: 12_000,
environment: { REA_SWIFTC_COMPILE_TIMEOUT_MS: "300000" },
}),
).toBe(12_000);
});
it("reads a valid REA_SWIFTC_COMPILE_TIMEOUT_MS value", () => {
expect(
resolveSwiftcCompileTimeoutMs({
environment: { REA_SWIFTC_COMPILE_TIMEOUT_MS: "300000" },
}),
).toBe(300_000);
});
it("falls back to the default for a malformed environment value", () => {
expect(
resolveSwiftcCompileTimeoutMs({
environment: { REA_SWIFTC_COMPILE_TIMEOUT_MS: "loud" },
}),
).toBe(120_000);
});
});