Skip to content

Commit 3cb3ca7

Browse files
committed
test(web): add unit tests for isStageRunning
Signed-off-by: vikash7485 <vikkiraj073@gmail.com>
1 parent 959e38b commit 3cb3ca7

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { StageStatus } from "~~/model/deployment_pb";
2+
import { isStageRunning } from "./is-stage-running";
3+
4+
describe("isStageRunning", () => {
5+
it.each([
6+
[StageStatus.STAGE_NOT_STARTED_YET, true],
7+
[StageStatus.STAGE_RUNNING, true],
8+
[StageStatus.STAGE_SUCCESS, false],
9+
[StageStatus.STAGE_FAILURE, false],
10+
[StageStatus.STAGE_CANCELLED, false],
11+
[StageStatus.STAGE_SKIPPED, false],
12+
[StageStatus.STAGE_EXITED, false],
13+
])("given status %p, returns %p", (status, expected) => {
14+
expect(isStageRunning(status)).toBe(expected);
15+
});
16+
});

0 commit comments

Comments
 (0)