Files
shields/services/librariesio/librariesio-dependents.tester.js
Paul Melnikow 946abc9ded Refactor [librariesio] (#3160)
This takes another pass over the modern services to remove unused code. I switched the shared code to use a function instead of a class and removed the indirection in the route params which led to skew between the route and examples and wasn't making things any clearer.
2019-03-06 23:21:22 -05:00

20 lines
452 B
JavaScript

'use strict'
const { isMetric } = require('../test-validators')
const t = (module.exports = require('../tester').createServiceTester())
t.create('dependent count')
.get('/npm/got.json')
.expectBadge({
label: 'dependents',
message: isMetric,
})
t.create('dependent count (nonexistent package)')
.get('/npm/foobar-is-not-package.json')
.timeout(10000)
.expectBadge({
label: 'dependents',
message: 'package not found',
})