* Add [Conan] version service * Rework to use conan-center-index GitHub repo * Conditional mock based on presence of github token * Refactor yaml parsing into a helper function, move tests to .spec.js * remove custom version parsing * improve test data * updates from review Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
18 lines
570 B
JavaScript
18 lines
570 B
JavaScript
import { isSemver } from '../test-validators.js'
|
|
import { createServiceTester } from '../tester.js'
|
|
|
|
export const t = await createServiceTester()
|
|
|
|
t.create('gets the package version of zeromq')
|
|
.get('/zeromq.json')
|
|
.expectBadge({ label: 'conan', message: isSemver })
|
|
|
|
t.create('returns not found for invalid package')
|
|
.get('/this package does not exist - shields test.json')
|
|
.expectBadge({
|
|
label: 'conan',
|
|
color: 'red',
|
|
message:
|
|
'repo not found, branch not found, or recipes/this package does not exist - shields test/config.yml missing',
|
|
})
|