Files
shields/services/gitlab/gitlab-labels.tester.js
Gabbar 283b3935df [GitLab]: Adds label badges and tests (#12112)
* 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
2026-08-28 21:19:03 +02:00

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',
})