We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 346a349 commit ca54f5dCopy full SHA for ca54f5d
packages/docusaurus/src/commands/swizzle/__tests__/index.test.ts
@@ -91,10 +91,15 @@ async function createTestSite() {
91
const siteThemePathPosix = posixPath(siteThemePath);
92
expect(tree(siteThemePathPosix)).toMatchSnapshot('theme dir tree');
93
94
- const files = (await Globby(siteThemePathPosix, {absolute: true})).sort();
+ const files = (await Globby(siteThemePathPosix))
95
+ .map((file) => path.posix.relative(siteThemePathPosix, file))
96
+ .sort();
97
98
for (const file of files) {
- const fileContent = await fs.readFile(file, 'utf-8');
99
+ const fileContent = await fs.readFile(
100
+ path.posix.join(siteThemePath, file),
101
+ 'utf-8',
102
+ );
103
expect(fileContent).toMatchSnapshot(file);
104
}
105
0 commit comments