@@ -62,11 +62,12 @@ test('ignores unsupported files with --ignore-unknown', () => {
6262 const result = runFmt ( [ ...modeArgs , '--ignore-unknown' , 'notes.unknown' ] ) ;
6363
6464 expect ( result . status ) . toBe ( 0 ) ;
65- expect ( result . stdout ) . toBe (
66- modeArgs . includes ( '--check' )
67- ? 'start Checking formatting...\nsuccess No supported files to check.\n'
68- : '' ,
69- ) ;
65+ const expectedStdout = modeArgs . includes ( '--check' )
66+ ? 'start Checking formatting...\nsuccess No supported files to check.\n'
67+ : modeArgs . includes ( '--list-different' )
68+ ? ''
69+ : 'start Formatting...\nsuccess No supported files to format.\n' ;
70+ expect ( result . stdout ) . toBe ( expectedStdout ) ;
7071 expect ( result . stderr ) . toBe ( '' ) ;
7172 }
7273} ) ;
@@ -77,7 +78,7 @@ test('supports -u as an alias for --ignore-unknown', () => {
7778 const result = runFmt ( [ '-u' , 'notes.unknown' ] ) ;
7879
7980 expect ( result . status ) . toBe ( 0 ) ;
80- expect ( result . stdout ) . toBe ( '' ) ;
81+ expect ( result . stdout ) . toBe ( 'start Formatting...\nsuccess No supported files to format.\n ' ) ;
8182 expect ( result . stderr ) . toBe ( '' ) ;
8283} ) ;
8384
@@ -95,6 +96,6 @@ test('does not treat unsupported files as unmatched patterns', () => {
9596 const result = runFmt ( [ '--no-error-on-unmatched-pattern' , 'notes.unknown' ] ) ;
9697
9798 expect ( result . status ) . toBe ( 2 ) ;
98- expect ( result . stdout ) . toBe ( '' ) ;
99+ expect ( result . stdout ) . toBe ( 'start Formatting...\n ' ) ;
99100 expect ( result . stderr ) . toContain ( 'No supported files matched "notes.unknown"' ) ;
100101} ) ;
0 commit comments