openclaw/test/scripts/control-ui-proof-args.test.ts
Peter Steinberger da76ab304a
test(core, plugins): remove low-value tests (batch d039) (#159090)
* test(status): deslop s223 tests

* test(onepassword): deslop s225 tests

* test(mcp): deslop s224 tests

* test(scripts): deslop s215 tests

* test(fal): deslop s226 tests

* test(feishu): deslop s227 tests

* test(amazon-bedrock-mantle): deslop s229 tests

* test(lobster): deslop s234 tests

* test(comfy): deslop s228 tests

* test(irc): deslop s230 tests
2026-09-26 18:26:30 +00:00

19 lines
848 B
TypeScript

import { describe, expect, it } from "vitest";
import { readControlUiProofOption } from "../../scripts/lib/control-ui-proof-args.mts";
describe("readControlUiProofOption", () => {
it.each([
["first inline", ["node", "script", "--label=first", "--label=second"], "first"],
["first split", ["node", "script", "--label", "first", "--label", "second"], "first"],
["split then inline", ["node", "script", "--label", "split", "--label=inline"], "inline"],
["empty inline", ["node", "script", "--label="], ""],
["missing split", ["node", "script", "--label"], undefined],
[
"next option as split value",
["node", "script", "--label", "--output-dir", "proof"],
"--output-dir",
],
] as const)("%s", (_name, argv, expected) => {
expect(readControlUiProofOption(argv, "label")).toBe(expected);
});
});