fix(qa): reject duplicate telegram proof controls

This commit is contained in:
Vincent Koc
2026-06-23 16:54:31 +02:00
parent e9b017d9dc
commit 2cbb4e70cc
2 changed files with 20 additions and 2 deletions

View File

@@ -157,6 +157,17 @@ describe("telegram user Crabbox proof log polling", () => {
expect(parseArgs(["--text", "-ping"]).text).toBe("-ping");
});
it("rejects duplicate single-value proof controls while keeping repeated expectations", () => {
expect(() =>
parseArgs(["--output-dir", ".artifacts/one", "--output-dir", ".artifacts/two"]),
).toThrow("--output-dir was provided more than once");
expect(parseArgs(["--expect", "OpenClaw", "--expect", "ready"]).expect).toEqual([
"OpenClaw",
"ready",
]);
});
it("uses unique default output dirs", () => {
const firstOutputDir = parseArgs([]).outputDir;
const secondOutputDir = parseArgs([]).outputDir;