1
0
mirror of https://github.com/badges/shields.git synced 2025-11-08 01:07:08 +03:00

[Crates] Implement Dependents Badge (#10438)

* add dependents service

* remove redundant timeout
This commit is contained in:
Eray Erdin (&mut self)
2024-08-04 23:25:25 +03:00
committed by GitHub
parent bdf84f9f94
commit a583ca7105
2 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
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',
})