Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Test improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
iansu committed Jun 18, 2019
1 parent 3faacd4 commit e2f6b81
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/services/codebuild.test.js
Expand Up @@ -35,13 +35,16 @@ describe('AWS CodeBuild Provider', function() {
})

it('throws if pr number cannot be detected', function() {
process.env.CODEBUILD_WEBHOOK_HEAD_REF = 'refs/heads/master'
delete process.env.CODEBUILD_SOURCE_VERSION
expect(function() {
codebuild.configuration()
}).toThrow()
})

it('throws if slug cannot be detected', function() {
process.env.CODEBUILD_RESOLVED_SOURCE_VERSION =
'39ec2418eca4c539d765574a1c68f3bd77e8c549'
delete process.env.CODEBUILD_SOURCE_REPO_URL
expect(function() {
codebuild.configuration()
Expand Down

0 comments on commit e2f6b81

Please sign in to comment.