fix(qa): reject duplicate qa e2e outputs · openclaw/openclaw@7374ecc
vincentkoc
·
2026-06-23
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -95,6 +95,23 @@ describe("qa-e2e script", () => {
|
95 | 95 | expect(() => parseQaE2eArgs(["--output", "--help"])).toThrow("--output requires a value"); |
96 | 96 | }); |
97 | 97 | |
| 98 | +it("rejects duplicate output destinations before loading QA Lab", async () => { |
| 99 | +const env: NodeJS.ProcessEnv = {}; |
| 100 | +const loadRuntime = vi.fn(async () => { |
| 101 | +throw new Error("runtime loaded"); |
| 102 | +}); |
| 103 | + |
| 104 | +expect(() => |
| 105 | +parseQaE2eArgs(["--output", ".artifacts/first.md", "--output=.artifacts/second.md"]), |
| 106 | +).toThrow("qa:e2e output path was provided more than once"); |
| 107 | +await expect( |
| 108 | +main([".artifacts/first.md", "--output", ".artifacts/second.md"], { env, loadRuntime }), |
| 109 | +).rejects.toThrow("qa:e2e output path was provided more than once"); |
| 110 | + |
| 111 | +expect(loadRuntime).not.toHaveBeenCalled(); |
| 112 | +expect(env.OPENCLAW_BUILD_PRIVATE_QA).toBeUndefined(); |
| 113 | +}); |
| 114 | + |
98 | 115 | it.each([ |
99 | 116 | { status: "pass" as const, exitCode: 0 }, |
100 | 117 | { status: "fail" as const, exitCode: 1 }, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。