* add base for thunderstore services * badge service and corresponding tester for thunderstore download count * badge service and corresponding tester for thunderstore latest package version * fix HTML * use stable package-metrics endpoint * remove erroneous statement from docs * remove `namedLogo` from default badge data on both services * follow route naming conventions * use `[x].json` for test assertions * use existing version pattern * document service `handle` return-type more narrowly * use consistent test formatting * add base for thunderstore services * badge service and corresponding tester for thunderstore download count * badge service and corresponding tester for thunderstore latest package version * fix HTML * use stable package-metrics endpoint * remove erroneous statement from docs * remove `namedLogo` from default badge data on both services * follow route naming conventions * use `[x].json` for test assertions * use existing version pattern * document service `handle` return-type more narrowly * use consistent test formatting * plural-ise base thunderstore docs * don't require unused attributes * declare BaseThunderstoreService abstract, add docstring * add thunderstoreGreen static variable * add thunderstore likes service --------- Co-authored-by: chris48s <chris48s@users.noreply.github.com>
13 lines
402 B
JavaScript
13 lines
402 B
JavaScript
import { createServiceTester } from '../tester.js'
|
|
import { isMetric } from '../test-validators.js'
|
|
|
|
export const t = await createServiceTester()
|
|
|
|
t.create('Likes')
|
|
.get('/ebkr/r2modman.json')
|
|
.expectBadge({ label: 'likes', message: isMetric })
|
|
|
|
t.create('Likes (not found)')
|
|
.get('/not-a-namespace/not-a-package-name.json')
|
|
.expectBadge({ label: 'likes', message: 'not found', color: 'red' })
|