mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-03 19:32:35 +02:00
chore: simplify construction of test paths (#11196)
This commit is contained in:
parent
5d858f5e66
commit
ba18a8b8b9
1 changed files with 2 additions and 4 deletions
|
@ -91,13 +91,11 @@ async function createTestSite() {
|
|||
const siteThemePathPosix = posixPath(siteThemePath);
|
||||
expect(tree(siteThemePathPosix)).toMatchSnapshot('theme dir tree');
|
||||
|
||||
const files = (await Globby(siteThemePathPosix))
|
||||
.map((file) => path.posix.relative(siteThemePathPosix, file))
|
||||
.sort();
|
||||
const files = await Globby('**/*', {cwd: siteThemePath});
|
||||
|
||||
for (const file of files) {
|
||||
const fileContent = await fs.readFile(
|
||||
path.posix.join(siteThemePath, file),
|
||||
path.join(siteThemePath, file),
|
||||
'utf-8',
|
||||
);
|
||||
expect(fileContent).toMatchSnapshot(file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue