Skip to content

Commit

Permalink
feat: remove PR on test success
Browse files Browse the repository at this point in the history
change the status and the conclussion to values defined in

[checkrun definitio](https://docs.github.com/en/enterprise-server@2.21/graphql/reference/objects#checkrun)
  • Loading branch information
ghinks committed Apr 10, 2021
1 parent c514690 commit 18004c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ tap.test('wiby.result()', async (tap) => {
t.equal(result, undefined)
})
t.test('status not completed returns empty array', async (t) => {
const result = await wiby.result.updatePRStatus(owner, repo, branch, [{ status: 'bad' }])
const result = await wiby.result.updatePRStatus(owner, repo, branch, [{ status: 'queued' }])
t.equal(result.length, 0)
})
t.test('conclusion not a success returns empty array', async (t) => {
const result = await wiby.result.updatePRStatus(owner, repo, branch, [{ status: 'bad', conclusion: 'bad' }])
const result = await wiby.result.updatePRStatus(owner, repo, branch, [{ status: 'queued', conclusion: 'failure' }])
t.equal(result.length, 0)
})
t.test('no pull requests returns empty array', async (t) => {
Expand Down

0 comments on commit 18004c5

Please sign in to comment.