mirror of
https://github.com/badges/shields.git
synced 2025-04-18 19:44:04 +03:00
* feat: add gitlab language count service * fix testr * fix Signed-off-by: guoxudong <guoxd@jihulab.com> Signed-off-by: guoxudong <guoxd@jihulab.com> Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
26 lines
665 B
JavaScript
26 lines
665 B
JavaScript
import { isMetric } from '../test-validators.js'
|
|
import { createServiceTester } from '../tester.js'
|
|
|
|
export const t = await createServiceTester()
|
|
|
|
t.create('language count').get('/gitlab-org/gitlab.json').expectBadge({
|
|
label: 'languages',
|
|
message: isMetric,
|
|
color: 'blue',
|
|
})
|
|
|
|
t.create('language count (self-managed)')
|
|
.get('/gitlab-cn/gitlab.json?gitlab_url=https://jihulab.com')
|
|
.expectBadge({
|
|
label: 'languages',
|
|
message: isMetric,
|
|
color: 'blue',
|
|
})
|
|
|
|
t.create('language count (project not found)')
|
|
.get('/open/guoxudong.io/shields-test/do-not-exist.json')
|
|
.expectBadge({
|
|
label: 'languages',
|
|
message: 'project not found',
|
|
})
|