mirror of
https://github.com/badges/shields.git
synced 2026-11-21 16:06:35 +03:00
* feat(gitlab): add gitlab label service * fix(gitlab): update validation for labels * feat(gitlab): add tests for gitlab labels * chore(package.json): remove allowScripts * fix(gitlab): add gitlab_url queryParam and self-managed test * chore(gitlab): add gitlab labels spec * fix(gitlab): remove links and adjust params
22 lines
546 B
JavaScript
22 lines
546 B
JavaScript
import { createServiceTester } from '../tester.js'
|
|
|
|
export const t = await createServiceTester()
|
|
|
|
t.create('Label Unit Test').get('/gitlab-org/gitlab/bug.json').expectBadge({
|
|
message: 'bug',
|
|
color: '#6699cc',
|
|
})
|
|
|
|
t.create('Label (self-managed)')
|
|
.get('/gitlab-cn/gitlab/type::bug.json?gitlab_url=https://jihulab.com')
|
|
.expectBadge({
|
|
message: 'type::bug',
|
|
color: '#ff0000',
|
|
})
|
|
|
|
t.create('Label (project not found)')
|
|
.get('/user1/gitlab-does-not-have-this-repo/bug.json')
|
|
.expectBadge({
|
|
message: 'project not found',
|
|
})
|