@@ -9,20 +9,47 @@ describe("steps/getFilesToProcess", () => {
99    const  cwd  =  process . cwd ( ) ; 
1010    const  testDirectory  =  join ( cwd ,  "test/fixtures/files" ) ; 
1111    const  files  =  getFilesToProcess ( testDirectory ,  [ "js" ] ) ; 
12-     expect ( files ) . toHaveLength ( 1 ) ; 
12+     expect ( files . map ( ( path )  =>  path . replace ( cwd ,  "" ) ) ) . toMatchInlineSnapshot ( ` 
13+       [ 
14+         "/test/fixtures/files/file.js", 
15+       ] 
16+     ` ) ; 
1317  } ) ; 
1418
1519  it ( "gets files with multiple extensions correctly" ,  ( )  =>  { 
1620    const  cwd  =  process . cwd ( ) ; 
1721    const  testDirectory  =  join ( cwd ,  "test/fixtures/files" ) ; 
1822    const  files  =  getFilesToProcess ( testDirectory ,  [ "js" ,  "ts" ] ) ; 
19-     expect ( files ) . toHaveLength ( 2 ) ; 
23+     expect ( files . map ( ( path )  =>  path . replace ( cwd ,  "" ) ) ) . toMatchInlineSnapshot ( ` 
24+       [ 
25+         "/test/fixtures/files/file.js", 
26+         "/test/fixtures/files/file.ts", 
27+       ] 
28+     ` ) ; 
29+   } ) ; 
30+ 
31+   it ( "gets files with paths that have special characters correctly" ,  ( )  =>  { 
32+     const  cwd  =  process . cwd ( ) ; 
33+     const  testDirectory  =  join ( cwd ,  "test/fixtures/(special files*)" ) ; 
34+     const  files  =  getFilesToProcess ( testDirectory ,  [ "js" ,  "ts" ] ) ; 
35+     expect ( files . map ( ( path )  =>  path . replace ( cwd ,  "" ) ) ) . toMatchInlineSnapshot ( ` 
36+       [ 
37+         "/test/fixtures/(special files*)/file \\slash.js", 
38+         "/test/fixtures/(special files*)/file with (parentheses).js", 
39+         "/test/fixtures/(special files*)/file with space.js", 
40+       ] 
41+     ` ) ; 
2042  } ) ; 
2143
2244  it ( "gets nested files correctly" ,  ( )  =>  { 
2345    const  cwd  =  process . cwd ( ) ; 
2446    const  testDirectory  =  join ( cwd ,  "test/fixtures/files" ) ; 
2547    const  files  =  getFilesToProcess ( testDirectory ,  [ "tsx" ] ) ; 
26-     expect ( files ) . toHaveLength ( 2 ) ; 
48+     expect ( files . map ( ( path )  =>  path . replace ( cwd ,  "" ) ) ) . toMatchInlineSnapshot ( ` 
49+       [ 
50+         "/test/fixtures/files/file.tsx", 
51+         "/test/fixtures/files/nested/file.tsx", 
52+       ] 
53+     ` ) ; 
2754  } ) ; 
2855} ) ; 
0 commit comments