From 5f745d4fa40aea65c55c7ce1d6f384265b4e9d88 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 12:04:21 +0000 Subject: [PATCH] test: assert getBody is not called when validateExclusiveModes fails Co-authored-by: marocchino <128431+marocchino@users.noreply.github.com> --- __tests__/main.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index 939dbf9..1fd3be7 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -117,6 +117,7 @@ describe("run", () => { expect(core.setFailed).toHaveBeenCalledWith( "delete and recreate cannot be set to true simultaneously", ) + expect(mockConfig.getBody).not.toHaveBeenCalled() }) test("fails when deleteOldComment and onlyCreateComment are both true", async () => { @@ -126,6 +127,7 @@ describe("run", () => { expect(core.setFailed).toHaveBeenCalledWith( "delete and only_create cannot be set to true simultaneously", ) + expect(mockConfig.getBody).not.toHaveBeenCalled() }) test("fails when deleteOldComment and hideOldComment are both true", async () => { @@ -135,6 +137,7 @@ describe("run", () => { expect(core.setFailed).toHaveBeenCalledWith( "delete and hide cannot be set to true simultaneously", ) + expect(mockConfig.getBody).not.toHaveBeenCalled() }) test("fails when onlyCreateComment and onlyUpdateComment are both true", async () => { @@ -144,6 +147,7 @@ describe("run", () => { expect(core.setFailed).toHaveBeenCalledWith( "only_create and only_update cannot be set to true simultaneously", ) + expect(mockConfig.getBody).not.toHaveBeenCalled() }) test("fails when hideOldComment and hideAndRecreate are both true", async () => { @@ -153,6 +157,7 @@ describe("run", () => { expect(core.setFailed).toHaveBeenCalledWith( "hide and hide_and_recreate cannot be set to true simultaneously", ) + expect(mockConfig.getBody).not.toHaveBeenCalled() }) test("fails when deleteOldComment and hideAndRecreate are both true", async () => { @@ -162,6 +167,7 @@ describe("run", () => { expect(core.setFailed).toHaveBeenCalledWith( "delete and hide_and_recreate cannot be set to true simultaneously", ) + expect(mockConfig.getBody).not.toHaveBeenCalled() }) test("deletes previous comment when deleteOldComment is true and previous comment exists", async () => {