1
0
mirror of https://github.com/badges/shields.git synced 2025-04-18 19:44:04 +03:00
shields/services/contributor-count.spec.js
2021-07-09 12:53:55 +01:00

23 lines
648 B
JavaScript

import { test, given } from 'sazerac'
import { renderContributorBadge } from './contributor-count.js'
describe('Contributor count helpers', function () {
test(renderContributorBadge, () => {
given({ label: 'maintainers', contributorCount: 1 }).expect({
label: 'maintainers',
message: '1',
color: 'red',
})
given({ label: 'collaborators', contributorCount: 2 }).expect({
label: 'collaborators',
message: '2',
color: 'yellow',
})
given({ label: 'collaborators', contributorCount: 3000 }).expect({
label: 'collaborators',
message: '3k',
color: 'brightgreen',
})
})
})