[GitHubChecksStatus] Add commit check badge (#5973)
* Add GH commit check badge * Fix class name, tests * Run prettier * Refactor to generic checks * Run prettier * Make keywords separate from title * Make commit failing tests actually fail * Resolve suggested edits * Sanitize imports * Follow import order requirements Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
d0b93b4103
commit
d69f7b6b5f
19
services/github/github-checks-status.tester.js
Normal file
19
services/github/github-checks-status.tester.js
Normal file
@@ -0,0 +1,19 @@
|
||||
'use strict'
|
||||
|
||||
const t = (module.exports = require('../tester').createServiceTester())
|
||||
const { isBuildStatus } = require('../build-status')
|
||||
|
||||
t.create('branch checks (branch)')
|
||||
.get('/badges/shields/master.json')
|
||||
.expectBadge({
|
||||
label: 'checks',
|
||||
message: isBuildStatus,
|
||||
})
|
||||
|
||||
t.create('checks - nonexistent ref')
|
||||
.get('/badges/shields/this-ref-does-not-exist.json')
|
||||
.expectBadge({
|
||||
label: 'checks',
|
||||
message: 'ref or repo not found',
|
||||
color: 'red',
|
||||
})
|
||||
Reference in New Issue
Block a user