Files
shields/services/bitbucket/bitbucket-issues.tester.js
Pierre-Yves Bigourdan cb2ebe2e94 migrate examples to openApi part 37; affects [bitbucket bitrise chromewebstore circleci] (#9881)
* migrate some services from examples to openApi

* Fix Bitbucket tests and examples

* Fix CircleCI and Bitrise tests

* Use fake token in Bitrise examples

* Use JohnEstropia/CoreStore token in Bitrise tests
2024-02-14 18:52:47 +00:00

39 lines
1.1 KiB
JavaScript

import { ServiceTester } from '../tester.js'
import { isMetric, isMetricOpenIssues } from '../test-validators.js'
export const t = new ServiceTester({
id: 'BitbucketIssues',
title: 'Bitbucket Issues',
pathPrefix: '/bitbucket',
})
t.create('issues-raw (valid)')
.get('/issues-raw/shields-io/test-repo.json')
.expectBadge({
label: 'issues',
message: isMetric,
})
t.create('issues-raw (not found)')
.get('/issues-raw/shields-io/not-a-repo.json')
.expectBadge({ label: 'issues', message: 'not found' })
t.create('issues-raw (private repo)')
.get('/issues-raw/chris48s/example-private-repo.json')
.expectBadge({ label: 'issues', message: 'private repo' })
t.create('issues (valid)')
.get('/issues/shields-io/test-repo.json')
.expectBadge({
label: 'issues',
message: isMetricOpenIssues,
})
t.create('issues (not found)')
.get('/issues/shields-io/not-a-repo.json')
.expectBadge({ label: 'issues', message: 'not found' })
t.create('issues (private repo)')
.get('/issues/chris48s/example-private-repo.json')
.expectBadge({ label: 'issues', message: 'private repo' })