Files
reverse-engineering-anything/tests/boundary/cli/projectedErrorStatus.test.ts
T
46728ca41d test: remove per-test deadlines owned by project policy
Explicit deadlines at or below the project deadline only shortened it:
a literal 30-second value also disabled the coverage scaling, which timed
out wide-capacity regressions on main. Workloads above the built
deadline use the long-running tag. Deadlines derived from an operation
budget 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 05:27:07 +08:00

50 lines
1.5 KiB
TypeScript

import { describe, expect } from "vitest";
import { cliTest } from "../../support/cli/cliFixture.js";
describe("projected CLI failures", () => {
cliTest(
"exits unsuccessfully for invalid managed reconstruction input",
async ({ cli }) => {
const result = await cli.run({
arguments: ["import-managed-reconstruction", "{}", "--json"],
});
expect(result.json).toMatchObject({ code: "invalid_request" });
expect(result.exitCode).toBe(1);
},
);
cliTest(
"keeps successful target-free inventory commands successful",
async ({ cli }) => {
const result = await cli.run({ arguments: ["capabilities", "--json"] });
expect(result.exitCode).toBe(0);
expect(result.json).toBeDefined();
},
);
cliTest(
"preserves failure identity when output selectors match or miss",
async ({ cli }) => {
for (const format of ["json", "toon", "yaml", "md"])
for (const filter of ["missing", "code", "message"]) {
const result = await cli.run({
arguments: [
"import-managed-reconstruction",
"{}",
"--format",
format,
"--filter-output",
filter,
],
});
expect(result.exitCode).toBe(1);
expect(result.stdout).toContain("invalid_request");
expect(result.stdout).toContain("remediation");
if (format === "json")
expect(result.json).toMatchObject({ code: "invalid_request" });
}
},
);
});