mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 09:39:25 +00:00
* 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
19 lines
848 B
TypeScript
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);
|
|
});
|
|
});
|