Skip to content

Commit 6d6603b

Browse files
committed
add test for case where we had infinite loop
1 parent de95ef1 commit 6d6603b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Binary file not shown.

packages/render/src/shared/utils/pretty.spec.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,15 @@ describe('wrapText()', () => {
6969
);
7070
expect(wrapText(spaceCharacters, '', 80, '\n')).toBe(spaceCharacters);
7171
});
72+
73+
it('should work with ending words that are larger than the max line size', () => {
74+
expect(
75+
wrapText(
76+
'Want to go beyond the square cube? Draw inspiration from EntropyReversed's',
77+
'',
78+
16,
79+
'\n',
80+
),
81+
).toMatchSnapshot();
82+
});
7283
});

0 commit comments

Comments
 (0)