File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -391,9 +391,14 @@ describe('Logger', () => {
391391
392392 it ( 'should strip existing symbols from step message' , ( ) => {
393393 testLogger . step ( '→ Step 1' )
394- const output = stdoutChunks . join ( '' )
395- // Should have the symbol added by step(), not doubled
396- const arrowCount = ( output . match ( / [ → > ] / g) || [ ] ) . length
394+ // Get the last chunk (the actual step line, not the blank line)
395+ const stepLine = stdoutChunks [ stdoutChunks . length - 1 ]
396+ // Strip ANSI color codes for easier testing
397+ const stripped = stepLine . replace ( / \x1b \[ \d + m / g, '' )
398+ // Should have exactly one arrow symbol and the message text
399+ expect ( stripped ) . toMatch ( / ^ [ → > ] S t e p 1 \n $ / )
400+ // Verify the arrow appears exactly once at the start
401+ const arrowCount = ( stripped . match ( / [ → > ] / g) || [ ] ) . length
397402 expect ( arrowCount ) . toBe ( 1 )
398403 } )
399404
You can’t perform that action at this time.
0 commit comments