include more detail in error logging (#58)

Signed-off-by: Brian DeHamer <[email protected]>
This commit is contained in:
Brian DeHamer
2024-05-09 12:34:01 -07:00
committed by GitHub
parent 9b22bf5c9f
commit b0d8b47eb7
3 changed files with 26 additions and 9 deletions
+7 -5
View File
@@ -116,7 +116,9 @@ describe('action', () => {
expect(runMock).toHaveReturned()
expect(setFailedMock).toHaveBeenCalledWith(
expect.stringMatching(/missing "id-token" permission/)
new Error(
'missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.'
)
)
})
})
@@ -131,9 +133,7 @@ describe('action', () => {
expect(runMock).toHaveReturned()
expect(setFailedMock).toHaveBeenCalledWith(
expect.stringMatching(
/one of subject-path or subject-digest must be provided/i
)
new Error('One of subject-path or subject-digest must be provided')
)
})
})
@@ -330,7 +330,9 @@ describe('action', () => {
expect(runMock).toHaveReturned()
expect(setFailedMock).toHaveBeenCalledWith(
'Too many subjects specified. The maximum number of subjects is 64.'
new Error(
'Too many subjects specified. The maximum number of subjects is 64.'
)
)
})
})