add check when no deployment is found

This commit is contained in:
grantbirki
2023-04-14 21:04:16 +01:00
parent 7b5216ce57
commit 44c5eaa46e
2 changed files with 8 additions and 1 deletions

View File

@@ -300,6 +300,13 @@ describe('Deployment', () => {
createDeploymentScope.done()
deploymentStatusScope.done()
})
it('fails check when no deployment is found', async () => {
process.env.GITHUB_SHA = 'valid-build-version'
const deployment = new Deployment()
await deployment.check()
expect(core.setFailed).toBeCalledWith('Deployment not found.')
})
})
describe('#cancel', () => {