fix(scripts): reject short flag TUI PTY values

This commit is contained in:
Vincent Koc
2026-06-21 22:52:08 +02:00
parent 179eb15554
commit dfbc9ab246
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -356,6 +356,14 @@ describe("script-specific dev tooling hardening", () => {
expect(result.stdout).toBe("");
});
it("rejects short flags as TUI PTY watch option values", () => {
for (const flag of ["--mode", "--mirror-path"]) {
expect(() => tuiPtyWatchTesting.parseOptions([flag, "-h"])).toThrow(
`${flag} requires a value`,
);
}
});
it("keeps TUI PTY watch vitest args behind the separator", () => {
expect(tuiPtyWatchTesting.parseOptions(["--mode", "all", "--", "--help"])).toMatchObject({
mode: "all",