From d42b86421969693e07dd8b97ed9fc9182c3bf005 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 24 Jun 2026 10:22:56 +0800 Subject: [PATCH] fix(qa): accept pnpm separator for lab up (#96246) --- scripts/qa-lab-up.ts | 3 ++- test/scripts/qa-lab-up.test.ts | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/qa-lab-up.ts b/scripts/qa-lab-up.ts index 67824a38462..a26118baad8 100644 --- a/scripts/qa-lab-up.ts +++ b/scripts/qa-lab-up.ts @@ -33,8 +33,9 @@ Options: } function parseQaLabUpArgs(argv: readonly string[]) { + const args = argv[0] === "--" ? argv.slice(1) : argv; return parseArgs({ - args: [...argv], + args: [...args], options, allowPositionals: false, }).values; diff --git a/test/scripts/qa-lab-up.test.ts b/test/scripts/qa-lab-up.test.ts index f3cb4fc5916..bde5c3d7cb6 100644 --- a/test/scripts/qa-lab-up.test.ts +++ b/test/scripts/qa-lab-up.test.ts @@ -34,6 +34,19 @@ describe("scripts/qa-lab-up", () => { ); }); + it("accepts the pnpm run argument separator", async () => { + const runQaDockerUpCommand = vi.fn(async () => {}); + const loadRuntime = vi.fn(async () => ({ runQaDockerUpCommand })); + + await expect( + qaLabUpTesting.runQaLabUp(["--", "--gateway-port", "4100"], { loadRuntime }), + ).resolves.toBe(0); + + expect(runQaDockerUpCommand).toHaveBeenCalledWith( + expect.objectContaining({ gatewayPort: 4100 }), + ); + }); + it("accepts the maximum TCP port before loading the Docker runtime", async () => { const runQaDockerUpCommand = vi.fn(async () => {}); const loadRuntime = vi.fn(async () => ({ runQaDockerUpCommand }));