test: consolidate JavaScript and provider fixture coverage

This commit is contained in:
morluto committed 2026-11-10 16:32:53 -05:00
1 parent 439c197c3f
commit 3c4be703cd
16 files changed
+23 -223

No files matched your search

+4 -20
View File
@@ -29,26 +29,6 @@ it("names the Wakaru configuration requirement when it is not configured", async
});
});
it("rejects an exhausted shared execution budget before launching the next command", async () => {
await expect(
runWakaruCommand({
command: "/selected/wakaru",
limiter: "/usr/bin/prlimit",
arguments: ["--version"],
cwd: "/tmp/unused",
environment: {},
deadline: performance.now() - 1,
launcher: async () => {
throw new Error("An expired budget must not launch");
},
}),
).rejects.toMatchObject({
_tag: "AnalysisTimeoutError",
operation: "recover_javascript_sources",
timeoutMs: RECOVERY_LIMITS.timeoutMs,
});
});
it("projects the fixed Wakaru deadline without an editable setting", async () => {
const refusal: unknown = await runWakaruCommand({
command: "/selected/wakaru",
@@ -63,6 +43,10 @@ it("projects the fixed Wakaru deadline without an editable setting", async () =>
}).catch((cause: unknown) => cause);
if (!(refusal instanceof AnalysisTimeoutError))
throw new Error("Expected the Wakaru deadline");
expect(refusal).toMatchObject({
operation: "recover_javascript_sources",
timeoutMs: RECOVERY_LIMITS.timeoutMs,
});
const projected = projectAnalysisError(refusal);
expect(projected).toMatchObject({
code: "provider_timeout",
@@ -290,7 +290,7 @@ describe("upstream source-map point evidence", () => {
});
describe("source-map layout admission", () => {
it.each(["ACAA", "AAAAC", "g", "!", "AA", "D"])(
it.each(["AAAAC", "g", "!", "AA", "D"])(
"rejects malformed VLQ/components/indexes: %s",
(mappings) => {
expect(() => trace({ ...leaf, mappings })).toThrow();