mirror of
https://github.com/badges/shields.git
synced 2025-04-18 19:44:04 +03:00
16 lines
413 B
JavaScript
16 lines
413 B
JavaScript
import { isMetric } from '../test-validators.js'
|
|
import { createServiceTester } from '../tester.js'
|
|
export const t = await createServiceTester()
|
|
|
|
t.create('dependent count').get('/tokio.json').expectBadge({
|
|
label: 'dependents',
|
|
message: isMetric,
|
|
})
|
|
|
|
t.create('dependent count (nonexistent package)')
|
|
.get('/foobar-is-not-crate.json')
|
|
.expectBadge({
|
|
label: 'crates.io',
|
|
message: 'not found',
|
|
})
|