mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-17 11:07:07 +02:00
chore(v2): fix windows Jest tests (#3959)
* test(v2): Fix docusaurus-utils tests for windows * test(v2): Fix plugin-client-redirects test - add the posixPath in writeRedirectsFiles.ts * test(v2): Fix plugin-content-pages test add posixPath in test and index * test(v2): add window test configuration - add the window test configuration in nodejs-windows.yml * test(v2): revert plugin-content-pages test fix * test(v2): Fix mdx-loader/transformImage test * test(v2): add cleanPath in transformImage test * fix version path tests for windows * make versionMetadata test work on Windows * try to fix posix/win32 path issues * attempt to fix windows test * try to make source alias less win32 sensitive * try to make source alias less win32 sensitive * try to make source alias less win32 sensitive * try to make source alias less win32 sensitive * try to make source alias less win32 sensitive * try to make source alias less win32 sensitive * specific jest config for windows * attempt to fix windows testing issue * attempt to fix windows testing issue * attempt to fix windows testing issue * attempt to fix windows testing issue * attempt to fix windows testing issue * attempt to fix windows testing issue * attempt to fix windows testing issue * remove bad cleanPath fn * try to fix windows tests * try to fix windows tests * blog: try to fix windows tests by using same logic as on docs plugin * try to fix windows tests * try to fix windows tests * try to fix windows tests * try to fix windows tests * improve the Github CI setup for windows: make jobs run in parallel * revert GH action change Co-authored-by: Sachin Kumar Rajput <skr571999@gmail.com>
This commit is contained in:
parent
863a4d85d3
commit
141d062c3b
29 changed files with 189 additions and 131 deletions
|
@ -28,37 +28,47 @@ describe('docusaurus-plugin-content-pages', () => {
|
|||
{
|
||||
type: 'jsx',
|
||||
permalink: '/',
|
||||
source: path.join('@site', pluginPath, 'index.js'),
|
||||
source: path.posix.join('@site', pluginPath, 'index.js'),
|
||||
},
|
||||
{
|
||||
type: 'jsx',
|
||||
permalink: '/typescript',
|
||||
source: path.join('@site', pluginPath, 'typescript.tsx'),
|
||||
source: path.posix.join('@site', pluginPath, 'typescript.tsx'),
|
||||
},
|
||||
{
|
||||
type: 'mdx',
|
||||
permalink: '/hello/',
|
||||
source: path.join('@site', pluginPath, 'hello', 'index.md'),
|
||||
source: path.posix.join('@site', pluginPath, 'hello', 'index.md'),
|
||||
},
|
||||
{
|
||||
type: 'mdx',
|
||||
permalink: '/hello/mdxPage',
|
||||
source: path.join('@site', pluginPath, 'hello', 'mdxPage.mdx'),
|
||||
source: path.posix.join('@site', pluginPath, 'hello', 'mdxPage.mdx'),
|
||||
},
|
||||
{
|
||||
type: 'jsx',
|
||||
permalink: '/hello/translatedJs',
|
||||
source: path.join('@site', pluginPath, 'hello', 'translatedJs.js'),
|
||||
source: path.posix.join(
|
||||
'@site',
|
||||
pluginPath,
|
||||
'hello',
|
||||
'translatedJs.js',
|
||||
),
|
||||
},
|
||||
{
|
||||
type: 'mdx',
|
||||
permalink: '/hello/translatedMd',
|
||||
source: path.join('@site', pluginPath, 'hello', 'translatedMd.md'),
|
||||
source: path.posix.join(
|
||||
'@site',
|
||||
pluginPath,
|
||||
'hello',
|
||||
'translatedMd.md',
|
||||
),
|
||||
},
|
||||
{
|
||||
type: 'jsx',
|
||||
permalink: '/hello/world',
|
||||
source: path.join('@site', pluginPath, 'hello', 'world.js'),
|
||||
source: path.posix.join('@site', pluginPath, 'hello', 'world.js'),
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
@ -81,7 +91,7 @@ describe('docusaurus-plugin-content-pages', () => {
|
|||
);
|
||||
const pagesMetadatas = (await plugin.loadContent?.())!;
|
||||
|
||||
const frTranslationsPath = path.join(
|
||||
const frTranslationsPath = path.posix.join(
|
||||
'@site',
|
||||
'i18n',
|
||||
'fr',
|
||||
|
@ -92,37 +102,37 @@ describe('docusaurus-plugin-content-pages', () => {
|
|||
{
|
||||
type: 'jsx',
|
||||
permalink: '/',
|
||||
source: path.join('@site', pluginPath, 'index.js'),
|
||||
source: path.posix.join('@site', pluginPath, 'index.js'),
|
||||
},
|
||||
{
|
||||
type: 'jsx',
|
||||
permalink: '/typescript',
|
||||
source: path.join('@site', pluginPath, 'typescript.tsx'),
|
||||
source: path.posix.join('@site', pluginPath, 'typescript.tsx'),
|
||||
},
|
||||
{
|
||||
type: 'mdx',
|
||||
permalink: '/hello/',
|
||||
source: path.join('@site', pluginPath, 'hello', 'index.md'),
|
||||
source: path.posix.join('@site', pluginPath, 'hello', 'index.md'),
|
||||
},
|
||||
{
|
||||
type: 'mdx',
|
||||
permalink: '/hello/mdxPage',
|
||||
source: path.join('@site', pluginPath, 'hello', 'mdxPage.mdx'),
|
||||
source: path.posix.join('@site', pluginPath, 'hello', 'mdxPage.mdx'),
|
||||
},
|
||||
{
|
||||
type: 'jsx',
|
||||
permalink: '/hello/translatedJs',
|
||||
source: path.join(frTranslationsPath, 'hello', 'translatedJs.js'),
|
||||
source: path.posix.join(frTranslationsPath, 'hello', 'translatedJs.js'),
|
||||
},
|
||||
{
|
||||
type: 'mdx',
|
||||
permalink: '/hello/translatedMd',
|
||||
source: path.join(frTranslationsPath, 'hello', 'translatedMd.md'),
|
||||
source: path.posix.join(frTranslationsPath, 'hello', 'translatedMd.md'),
|
||||
},
|
||||
{
|
||||
type: 'jsx',
|
||||
permalink: '/hello/world',
|
||||
source: path.join('@site', pluginPath, 'hello', 'world.js'),
|
||||
source: path.posix.join('@site', pluginPath, 'hello', 'world.js'),
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue