test(tasks): add task-flow operator coverage (#59683)

This commit is contained in:
Vincent Koc
2026-04-02 23:58:33 +09:00
committed by GitHub
parent 3872a866a1
commit d46240090a
6 changed files with 569 additions and 3 deletions

View File

@@ -381,4 +381,21 @@ describe("registerStatusHealthSessionsCommands", () => {
runtime,
);
});
it("uses TaskFlow wording for the alias command help", () => {
const program = new Command();
registerStatusHealthSessionsCommands(program);
const flowsCommand = program.commands.find((command) => command.name() === "flows");
expect(flowsCommand?.description()).toContain("TaskFlow");
expect(flowsCommand?.commands.find((command) => command.name() === "list")?.description()).toBe(
"List tracked TaskFlows",
);
expect(flowsCommand?.commands.find((command) => command.name() === "show")?.description()).toBe(
"Show one TaskFlow by flow id or owner key",
);
expect(
flowsCommand?.commands.find((command) => command.name() === "cancel")?.description(),
).toBe("Cancel a running TaskFlow");
});
});

View File

@@ -460,7 +460,7 @@ export function registerStatusHealthSessionsCommands(program: Command) {
flowsCmd
.command("list")
.description("List tracked background flows")
.description("List tracked TaskFlows")
.option("--json", "Output as JSON", false)
.option(
"--status <name>",
@@ -481,7 +481,7 @@ export function registerStatusHealthSessionsCommands(program: Command) {
flowsCmd
.command("show")
.description("Show one background flow by flow id or owner key")
.description("Show one TaskFlow by flow id or owner key")
.argument("<lookup>", "Flow id or owner key")
.option("--json", "Output as JSON", false)
.action(async (lookup, opts, command) => {
@@ -499,7 +499,7 @@ export function registerStatusHealthSessionsCommands(program: Command) {
flowsCmd
.command("cancel")
.description("Cancel a running background flow")
.description("Cancel a running TaskFlow")
.argument("<lookup>", "Flow id or owner key")
.action(async (lookup) => {
await runCommandWithRuntime(defaultRuntime, async () => {