Skip to content

Commit e69cd6d

Browse files
committed
fix(test): suppress noControlCharactersInRegex lint rule for ANSI stripping
Add biome-ignore comment to allow control character in regex used to strip ANSI color codes in logger test. The \x1b escape sequence is intentional and necessary for testing color code removal.
1 parent cb20cc5 commit e69cd6d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/logger.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ describe('Logger', () => {
394394
// Get the last chunk (the actual step line, not the blank line)
395395
const stepLine = stdoutChunks[stdoutChunks.length - 1]
396396
// Strip ANSI color codes for easier testing
397+
// biome-ignore lint/suspicious/noControlCharactersInRegex: ANSI escape sequence needed for stripping color codes
397398
const stripped = stepLine.replace(/\x1b\[\d+m/g, '')
398399
// Should have exactly one arrow symbol and the message text
399400
expect(stripped).toMatch(/^[>] Step 1\n$/)

0 commit comments

Comments
 (0)