Skip to content

Commit 335aa5e

Browse files
committed
Add test for workflowEventName
1 parent add1437 commit 335aa5e

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/actions-util.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,3 +775,14 @@ test("isAnalyzingDefaultBranch()", async (t) => {
775775
getAdditionalInputStub.restore();
776776
});
777777
});
778+
779+
test("workflowEventName()", async (t) => {
780+
process.env["GITHUB_EVENT_NAME"] = "push";
781+
t.deepEqual(actionsutil.workflowEventName(), "push");
782+
783+
process.env["GITHUB_EVENT_NAME"] = "dynamic";
784+
t.deepEqual(actionsutil.workflowEventName(), "dynamic");
785+
786+
process.env["CODESCANNING_EVENT_NAME"] = "push";
787+
t.deepEqual(actionsutil.workflowEventName(), "push");
788+
});

0 commit comments

Comments
 (0)