feat: add layered CLI help registry

This commit is contained in:
gitea committed 2026-09-11 17:18:39 +08:00
1 parent a5c0146c8d
commit 34983e1c07
4 files changed
+76 -3

No files matched your search

+13
View File
@@ -75,4 +75,17 @@ describe("CLI runner - version and help aliases", () => {
expect(data.exitCode).toBe(10);
expect(data.nextAction).toContain("--yes");
});
it("supports layered help by command domain and subcommand", async () => {
const domain = await runCli(["help", "workflow"]);
expect(domain.exitCode).toBe(0);
expect(domain.stdout).toContain("workflow -");
expect(domain.stdout).toContain("patch");
expect(domain.stdout).toContain("--dry-run");
const command = await runCli(["workflow", "publish", "--help"]);
expect(command.exitCode).toBe(0);
expect(command.stdout).toContain("publish");
expect(command.stdout).toContain("发布并启用工作流");
});
});