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() {
91
91
const siteThemePathPosix = posixPath ( siteThemePath ) ;
92
92
expect ( tree ( siteThemePathPosix ) ) . toMatchSnapshot ( 'theme dir tree' ) ;
93
93
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 ( ) ;
104
95
105
96
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' ) ;
110
98
expect ( fileContent ) . toMatchSnapshot ( file ) ;
111
99
}
112
100
}
You can’t perform that action at this time.
0 commit comments