fix(tooling): reject malformed topology limits

This commit is contained in:
Vincent Koc
2026-06-02 22:19:10 +02:00
parent 0188c541de
commit ac8338bb02
2 changed files with 11 additions and 1 deletions

View File

@@ -198,6 +198,15 @@ describe("ts-topology", () => {
`);
});
it("rejects malformed CLI limits", async () => {
const captured = createCapturedIo();
const exitCode = await main(["--limit=abc"], captured.io);
expect(exitCode).toBe(1);
expect(captured.readStderr()).toContain("--limit must be a positive integer");
expect(captured.readStdout()).toBe("");
});
it("throws a clear error for invalid text report names", () => {
expect(() =>
renderTextReport(