@@ -63,28 +63,16 @@ test('passes file arguments to lint and the formatting check', () => {
6363 expect ( result . stderr ) . toBe ( '' ) ;
6464} ) ;
6565
66- test ( 'preserves file arguments in the formatting fix command' , ( ) => {
67- writeLintConfig ( ) ;
68- writeProjectFile ( "src/selected file's.ts" , 'const selected=true' ) ;
69-
70- const result = runCheck ( [ "src/selected file's.ts" ] ) ;
71-
72- expect ( result . status ) . toBe ( 1 ) ;
73- expect ( result . stderr ) . toContain (
74- `Run rs fmt -- 'src/selected file'"'"'s.ts' to fix.` ,
75- ) ;
76- } ) ;
77-
7866test ( 'supports file arguments after the option terminator' , ( ) => {
7967 writeLintConfig ( ) ;
80- writeProjectFile ( '--selected.ts' , 'const selected= true' ) ;
68+ writeProjectFile ( '--selected.ts' , 'const selected = true;\n ' ) ;
8169
8270 const result = runCheck ( [ '--' , '--selected.ts' ] ) ;
8371
84- expect ( result . status ) . toBe ( 1 ) ;
85- expect ( result . stderr ) . toContain (
86- 'Formatting issues found in 1 file. Run rs fmt -- --selected.ts to fix.' ,
87- ) ;
72+ expect ( result . status ) . toBe ( 0 ) ;
73+ expect ( result . stdout ) . toContain ( 'Format check passed in' ) ;
74+ expect ( result . stdout ) . toContain ( '( 1 file)' ) ;
75+ expect ( result . stderr ) . toBe ( '' ) ;
8876} ) ;
8977
9078test ( 'enables type checking only with --type-check' , ( ) => {
0 commit comments