Skip to content

Commit bb32597

Browse files
committed
Test error output
1 parent 9d915b9 commit bb32597

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

__tests__/main.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,11 @@ describe('action', () => {
149149
}
150150
})
151151

152-
fetchMock.mockResponseOnce(JSON.stringify({}), { status: 400 })
152+
fetchMock.mockResponseOnce('Something went wrong', { status: 400 })
153153
await main.run()
154-
expect(setFailedMock).toHaveBeenCalled()
154+
expect(setFailedMock).toHaveBeenCalledWith(
155+
'HTTP Error: Something went wrong'
156+
)
155157
})
156158
it('Should create a new plugin if not found', async () => {
157159
getInputMock.mockImplementation(name => {

0 commit comments

Comments
 (0)