Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/utils/executionStatus.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,19 @@ describe("getOverallExecutionStatusFromStats()", () => {
).toBe("RUNNING");
});

test("returns succeeded when completed tasks include intentional skips", () => {
expect(
getOverallExecutionStatusFromStats({
SUCCEEDED: 2,
SKIPPED: 1,
}),
).toBe("SUCCEEDED");
});

test("returns skipped when every task was skipped", () => {
expect(getOverallExecutionStatusFromStats({ SKIPPED: 3 })).toBe("SKIPPED");
});

test("returns raw status values (use getExecutionStatusLabel for display)", () => {
expect(
getOverallExecutionStatusFromStats({
Expand Down
2 changes: 1 addition & 1 deletion src/utils/executionStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ const EXECUTION_STATUS_PRIORITY = [
"WAITING_FOR_UPSTREAM",
"QUEUED",
"UNINITIALIZED",
"SKIPPED",
"SUCCEEDED",
"SKIPPED",
] as const;

export type ExecutionStatusStats = Record<string, number>;
Expand Down
Loading