test: assert getBody is not called when validateExclusiveModes fails

Co-authored-by: marocchino <128431+marocchino@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-13 12:04:21 +00:00
parent 2cdb9b3380
commit 5f745d4fa4

View file

@ -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 () => {