Skip to content

Commit b2474d1

Browse files
committed
test: fix unit tests
1 parent 6479197 commit b2474d1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/bundler-plugin-core/src/utils/providers/__tests__/GitHubActions.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ describe("GitHub Actions Params", () => {
6363
mocks.baseLabel.mockReturnValue(baseLabel);
6464
mocks.headLabel.mockReturnValue(headLabel);
6565

66-
if (["pull_request", "pull_request_target"].includes(eventName)) {
66+
// not sure if empty string is correct here but for parity with previous tests
67+
// TODO: verify that empty string belongs here, from a glance it seems PushEvent does not
68+
// include a pull_request key
69+
if (["pull_request", "pull_request_target", ""].includes(eventName)) {
6770
vi.mocked(GitHub).context = {
6871
eventName,
6972
payload: {
@@ -277,7 +280,7 @@ describe("GitHub Actions Params", () => {
277280
build: "2",
278281
buildURL: "https://github.com/testOrg/testRepo/actions/runs/2",
279282
commit: "test-head-sha",
280-
compareSha: "test-base-sha",
283+
compareSha: null,
281284
job: "testWorkflow",
282285
pr: "1",
283286
service: "github-actions",
@@ -523,7 +526,7 @@ describe("GitHub Actions Params", () => {
523526
build: "2",
524527
buildURL: "https://github.com/testOrg/testRepo/actions/runs/2/jobs/2",
525528
commit: "test-head-sha",
526-
compareSha: "test-base-sha",
529+
compareSha: null,
527530
job: "testWorkflow",
528531
pr: "1",
529532
service: "github-actions",

0 commit comments

Comments
 (0)