Skip to content

Commit d42b864

Browse files
authored
fix(qa): accept pnpm separator for lab up (#96246)
1 parent ce0142f commit d42b864

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

scripts/qa-lab-up.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ Options:
3333
}
3434

3535
function parseQaLabUpArgs(argv: readonly string[]) {
36+
const args = argv[0] === "--" ? argv.slice(1) : argv;
3637
return parseArgs({
37-
args: [...argv],
38+
args: [...args],
3839
options,
3940
allowPositionals: false,
4041
}).values;

test/scripts/qa-lab-up.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,19 @@ describe("scripts/qa-lab-up", () => {
3434
);
3535
});
3636

37+
it("accepts the pnpm run argument separator", async () => {
38+
const runQaDockerUpCommand = vi.fn(async () => {});
39+
const loadRuntime = vi.fn(async () => ({ runQaDockerUpCommand }));
40+
41+
await expect(
42+
qaLabUpTesting.runQaLabUp(["--", "--gateway-port", "4100"], { loadRuntime }),
43+
).resolves.toBe(0);
44+
45+
expect(runQaDockerUpCommand).toHaveBeenCalledWith(
46+
expect.objectContaining({ gatewayPort: 4100 }),
47+
);
48+
});
49+
3750
it("accepts the maximum TCP port before loading the Docker runtime", async () => {
3851
const runQaDockerUpCommand = vi.fn(async () => {});
3952
const loadRuntime = vi.fn(async () => ({ runQaDockerUpCommand }));

0 commit comments

Comments
 (0)