File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed
packages/docusaurus/src/commands/swizzle/__tests__ Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -91,22 +91,10 @@ async function createTestSite() {
9191 const siteThemePathPosix = posixPath ( siteThemePath ) ;
9292 expect ( tree ( siteThemePathPosix ) ) . toMatchSnapshot ( 'theme dir tree' ) ;
9393
94- const globFiles = await Globby ( siteThemePathPosix ) ;
95- const files = globFiles
96- . map ( ( file ) => path . posix . relative ( siteThemePathPosix , file ) )
97- . sort ( ) ;
98- console . log ( {
99- siteThemePath,
100- siteThemePathPosix,
101- globFiles,
102- files,
103- } ) ;
94+ const files = ( await Globby ( siteThemePathPosix , { absolute : true } ) ) . sort ( ) ;
10495
10596 for ( const file of files ) {
106- const fileContent = await fs . readFile (
107- path . posix . join ( siteThemePath , file ) ,
108- 'utf-8' ,
109- ) ;
97+ const fileContent = await fs . readFile ( file , 'utf-8' ) ;
11098 expect ( fileContent ) . toMatchSnapshot ( file ) ;
11199 }
112100 }
You can’t perform that action at this time.
0 commit comments