We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c969f6 commit ddb1c07Copy full SHA for ddb1c07
1 file changed
lib/github.test.ts
@@ -538,6 +538,16 @@ describe('generateAchievements', () => {
538
539
expect(unlocked.some((a) => a.title === '100 Day Streak')).toBe(false);
540
});
541
+
542
+ it('caps progress between 0 and 100 for extreme values', () => {
543
+ const achievements = generateAchievements(999999, 999999);
544
545
+ for (const item of achievements) {
546
+ expect(Number.isFinite(item.progress)).toBe(true);
547
+ expect(item.progress).toBeGreaterThanOrEqual(0);
548
+ expect(item.progress).toBeLessThanOrEqual(100);
549
+ }
550
+ });
551
552
553
describe('validateGitHubUsername', () => {
0 commit comments