Files
shields/services/polymart/polymart-downloads.tester.js
Mher Zaqaryan 7136943d6d Add various [Polymart] badges (#8811)
* Add [polymart] badges (#7429)

* fix misspelling issue

* add required to all joi objects

* fix not found badge return a valid resource issue

* fix misspelling issue

* fix invalid resource issue

* remove default badge color

Co-authored-by: chris48s <chris48s@users.noreply.github.com>

* remove version default badge color

* change version label to the service name

* add renderVersionBadge() method for version rendering

* fix method name issue

* change version regex

* fix code style issue

* add renderVersionBadge from version and remove the manually added renderer

Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2023-01-16 20:58:56 +00:00

14 lines
375 B
JavaScript

import { isMetric } from '../test-validators.js'
import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Polymart Plugin (id 323)').get('/323.json').expectBadge({
label: 'downloads',
message: isMetric,
})
t.create('Invalid Resource (id 0)').get('/0.json').expectBadge({
label: 'downloads',
message: 'not found',
})