* chore(deps-dev): bump prettier from 2.8.8 to 3.0.0 Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * reformat all the things (prettier 3) * update tests to await calls to prettier.format() --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: chris48s <git@chris-shaw.dev>
31 lines
1.0 KiB
JavaScript
31 lines
1.0 KiB
JavaScript
import { createServiceTester } from '../tester.js'
|
|
export const t = await createServiceTester()
|
|
|
|
t.create('github pull request check state')
|
|
.get('/s/pulls/badges/shields/8486.json')
|
|
.expectBadge({ label: 'checks', message: 'failure' })
|
|
|
|
t.create('github pull request check state (pull request not found)')
|
|
.get('/s/pulls/badges/shields/5101.json')
|
|
.expectBadge({ label: 'checks', message: 'pull request or repo not found' })
|
|
|
|
t.create(
|
|
"github pull request check state (ref returned by github doesn't exist)",
|
|
)
|
|
.get('/s/pulls/badges/shields/1110.json')
|
|
.intercept(
|
|
nock =>
|
|
nock('https://api.github.com', { allowUnmocked: true })
|
|
.get('/repos/badges/shields/pulls/1110')
|
|
.reply(200, JSON.stringify({ head: { sha: 'abc123' } })), // Looks like a real ref, but isn't.
|
|
)
|
|
.networkOn()
|
|
.expectBadge({
|
|
label: 'checks',
|
|
message: 'commit not found',
|
|
})
|
|
|
|
t.create('github pull request check contexts')
|
|
.get('/contexts/pulls/badges/shields/8486.json')
|
|
.expectBadge({ label: 'checks', message: '2 success, 4 failure' })
|