Skip to content

Commit ca54f5d

Browse files
committed
Revert "simplify"
This reverts commit 346a349.
1 parent 346a349 commit ca54f5d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/docusaurus/src/commands/swizzle/__tests__/index.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,15 @@ async function createTestSite() {
9191
const siteThemePathPosix = posixPath(siteThemePath);
9292
expect(tree(siteThemePathPosix)).toMatchSnapshot('theme dir tree');
9393

94-
const files = (await Globby(siteThemePathPosix, {absolute: true})).sort();
94+
const files = (await Globby(siteThemePathPosix))
95+
.map((file) => path.posix.relative(siteThemePathPosix, file))
96+
.sort();
9597

9698
for (const file of files) {
97-
const fileContent = await fs.readFile(file, 'utf-8');
99+
const fileContent = await fs.readFile(
100+
path.posix.join(siteThemePath, file),
101+
'utf-8',
102+
);
98103
expect(fileContent).toMatchSnapshot(file);
99104
}
100105
}

0 commit comments

Comments
 (0)