Files
shields/services/github/github-contributors.tester.js
T
Ashwin S c5a5540441 [GithubContributors] Render "High contributor count" for repositories too large to compute (#12248)
* Added a condition for the 403 occurring due to high contributor count

* Made changes to the message and test
2026-11-12 17:37:11 +00:00

32 lines
805 B
JavaScript

import { createServiceTester } from '../tester.js'
import { isMetric } from '../test-validators.js'
export const t = await createServiceTester()
t.create('Contributors').get('/contributors/badges/shields.json').expectBadge({
label: 'contributors',
message: isMetric,
})
t.create('1 contributor')
.get('/contributors/badges/shields-tests.json')
.expectBadge({
label: 'contributors',
message: '1',
})
t.create('Contributors (repo not found)')
.get('/contributors/badges/helmets.json')
.expectBadge({
label: 'contributors',
message: 'repo not found',
})
t.create('Contributors (too many to compute)')
.timeout(20000)
.get('/contributors/NixOS/nixpkgs.json')
.expectBadge({
label: 'contributors',
message: 'repository too large',
color: 'lightgrey',
})