mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-07 10:34:44 +00:00
fix(qa): reject duplicate qa e2e outputs
This commit is contained in:
@@ -95,6 +95,23 @@ describe("qa-e2e script", () => {
|
||||
expect(() => parseQaE2eArgs(["--output", "--help"])).toThrow("--output requires a value");
|
||||
});
|
||||
|
||||
it("rejects duplicate output destinations before loading QA Lab", async () => {
|
||||
const env: NodeJS.ProcessEnv = {};
|
||||
const loadRuntime = vi.fn(async () => {
|
||||
throw new Error("runtime loaded");
|
||||
});
|
||||
|
||||
expect(() =>
|
||||
parseQaE2eArgs(["--output", ".artifacts/first.md", "--output=.artifacts/second.md"]),
|
||||
).toThrow("qa:e2e output path was provided more than once");
|
||||
await expect(
|
||||
main([".artifacts/first.md", "--output", ".artifacts/second.md"], { env, loadRuntime }),
|
||||
).rejects.toThrow("qa:e2e output path was provided more than once");
|
||||
|
||||
expect(loadRuntime).not.toHaveBeenCalled();
|
||||
expect(env.OPENCLAW_BUILD_PRIVATE_QA).toBeUndefined();
|
||||
});
|
||||
|
||||
it.each([
|
||||
{ status: "pass" as const, exitCode: 0 },
|
||||
{ status: "fail" as const, exitCode: 1 },
|
||||
|
||||
Reference in New Issue
Block a user