* add PUB popularity badge * update PUB popularity badge * update PUB popularity badge Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
24 lines
610 B
JavaScript
24 lines
610 B
JavaScript
import { isIntegerPercentage } from '../test-validators.js'
|
|
import { createServiceTester } from '../tester.js'
|
|
|
|
export const t = await createServiceTester()
|
|
|
|
t.create('pub popularity (valid)').get('/analysis_options.json').expectBadge({
|
|
label: 'popularity',
|
|
message: isIntegerPercentage,
|
|
})
|
|
|
|
t.create('pub popularity (not found)')
|
|
.get('/analysisoptions.json')
|
|
.expectBadge({
|
|
label: 'popularity',
|
|
message: 'not found',
|
|
color: 'red',
|
|
})
|
|
|
|
t.create('pub popularity (invalid)').get('/analysis-options.json').expectBadge({
|
|
label: 'popularity',
|
|
message: 'invalid',
|
|
color: 'lightgrey',
|
|
})
|