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:
committed by
GitHub
parent
bdf84f9f94
commit
a583ca7105
15
services/crates/crates-dependents.tester.js
Normal file
15
services/crates/crates-dependents.tester.js
Normal 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',
|
||||
})
|
||||
Reference in New Issue
Block a user