fix(qa): reject duplicate gateway cpu controls · openclaw/openclaw@b8811b7
vincentkoc
·
2026-06-23
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -111,6 +111,19 @@ describe("gateway CPU scenario guard", () => {
|
111 | 111 | } |
112 | 112 | }); |
113 | 113 | |
| 114 | +it("rejects duplicate single-value controls before running scenarios", () => { |
| 115 | +expect(() => |
| 116 | +testing.parseArgs(["--output-dir", makeTempRoot(), "--output-dir", makeTempRoot()]), |
| 117 | +).toThrow("--output-dir was provided more than once"); |
| 118 | + |
| 119 | +const result = runCli("--runs", "1", "--runs", "2"); |
| 120 | + |
| 121 | +expect(result.status).toBe(1); |
| 122 | +expect(result.stdout).toBe(""); |
| 123 | +expect(result.stderr.trim()).toBe("--runs was provided more than once"); |
| 124 | +expectNoNodeStack(result.stderr); |
| 125 | +}); |
| 126 | + |
114 | 127 | it("reports CLI argument errors without a Node stack trace", () => { |
115 | 128 | const result = runCli("--wat"); |
116 | 129 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。