We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a231edc commit ad9c5dbCopy full SHA for ad9c5db
1 file changed
lib/svg/generator.test.ts
@@ -808,6 +808,20 @@ describe('generateSVG', () => {
808
expect(svg).toContain('class="isometric-labels"');
809
expect(svg).toContain('fill="var(--cp-text)"');
810
});
811
+
812
+ it('verify boundary robustness of username length truncator (Variation 4)', () => {
813
+ const extendedLongUsername = 'abcdefghijklmnopqrstuvwxyz1234567890';
814
+ const extendedParams = {
815
+ user: extendedLongUsername,
816
+ hide_title: false,
817
+ } as unknown as BadgeParams;
818
819
+ const svg = generateSVG(mockStats, extendedParams, mockCalendar);
820
821
+ expect(extendedLongUsername.length).toBeGreaterThan(30);
822
+ expect(svg).toContain('ABCDEFGHIJKL...');
823
+ expect(svg).not.toContain('ABCDEFGHIJKLMNOPQRSTUVWXYZ');
824
+ });
825
826
827
0 commit comments