* Added pulsar-edit Downloads & Stargazers * Manage colour similar to how Docker Badges do * Fixed typo in colour * Or it seems no other (not found) tests check colour, likely overrided elsewhere * Remove usage of 'Edit' * errorMessages => httpErrors && downloads => dt --------- Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
21 lines
514 B
JavaScript
21 lines
514 B
JavaScript
import { isMetric } from '../test-validators.js'
|
|
import { createServiceTester } from '../tester.js'
|
|
import { pulsarPurple } from './pulsar-helper.js'
|
|
|
|
export const t = await createServiceTester()
|
|
|
|
t.create('pulsar stargazers (valid)')
|
|
.get('/hey-pane.json')
|
|
.expectBadge({
|
|
label: 'stargazers',
|
|
message: isMetric,
|
|
color: `#${pulsarPurple}`,
|
|
})
|
|
|
|
t.create('pulsar stargazers (not found)')
|
|
.get('/test-package.json')
|
|
.expectBadge({
|
|
label: 'stargazers',
|
|
message: 'package not found',
|
|
})
|