You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(ansi): add 13 edge case tests for ANSI escape code handling
Add comprehensive edge case testing for ansiRegex and stripAnsi functions:
ansiRegex edge cases (6 new tests):
- Multiple different sequence types (CSI + OSC mixed)
- Text with no ANSI codes (null match)
- C1 control sequences (0x9B CSI)
- RGB color codes with colon separators
- onlyFirst option behavior with non-global regex
- Complex pattern matching across sequence types
stripAnsi edge cases (7 new tests):
- RGB color codes (38;2;R;G;B format)
- 256 color codes (38;5;N format)
- Strings containing only ANSI codes
- Mixed content with newlines
- Unicode text with ANSI codes (你好)
- Emoji with ANSI codes (🎉)
- Long text performance (1000 char strings)
Test count: 16 → 29 tests (+13 tests, +81.25%)
All tests passing - validates robust ANSI escape code handling.
0 commit comments