Skip to content

Commit

Permalink
Add test for workflowEventName
Browse files Browse the repository at this point in the history
  • Loading branch information
David Verdeguer committed Sep 7, 2022
1 parent add1437 commit 335aa5e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/actions-util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -775,3 +775,14 @@ test("isAnalyzingDefaultBranch()", async (t) => {
getAdditionalInputStub.restore();
});
});

test("workflowEventName()", async (t) => {
process.env["GITHUB_EVENT_NAME"] = "push";
t.deepEqual(actionsutil.workflowEventName(), "push");

process.env["GITHUB_EVENT_NAME"] = "dynamic";
t.deepEqual(actionsutil.workflowEventName(), "dynamic");

process.env["CODESCANNING_EVENT_NAME"] = "push";
t.deepEqual(actionsutil.workflowEventName(), "push");
});

0 comments on commit 335aa5e

Please sign in to comment.