From c641b26d4b14091e65efdb4fd427e813a05c6e8b Mon Sep 17 00:00:00 2001 From: Cody Kaup Date: Tue, 8 Oct 2024 10:35:58 -0500 Subject: [PATCH] Fix tests in GitHub Actions --- node-src/git/getCommitAndBranch.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/node-src/git/getCommitAndBranch.test.ts b/node-src/git/getCommitAndBranch.test.ts index 91a6013bc..bd30cd1ec 100644 --- a/node-src/git/getCommitAndBranch.test.ts +++ b/node-src/git/getCommitAndBranch.test.ts @@ -197,6 +197,7 @@ describe('getCommitAndBranch', () => { it('throws on missing variable', async () => { process.env.GITHUB_EVENT_NAME = 'pull_request'; process.env.GITHUB_HEAD_REF = 'github'; + process.env.GITHUB_SHA = ''; await expect(getCommitAndBranch(ctx)).rejects.toThrow('Missing GitHub environment variable'); process.env.GITHUB_HEAD_REF = ''; process.env.GITHUB_SHA = '3276c796';