mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-30 18:58:36 +02:00
* 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>
46 lines
1.3 KiB
JavaScript
46 lines
1.3 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
const path = require('path');
|
|
|
|
const isWin = process.platform === 'win32';
|
|
|
|
const windowsSpecificIgnorePatterns = [
|
|
// v1 is legacy, not really worth it to invest in making its tests work on Windows
|
|
'/packages/docusaurus-1.x',
|
|
'/packages/docusaurus-init-1.x',
|
|
];
|
|
|
|
const ignorePatterns = [
|
|
'/node_modules/',
|
|
'__fixtures__',
|
|
'/packages/docusaurus/lib',
|
|
'/packages/docusaurus-utils/lib',
|
|
'/packages/docusaurus-utils-validation/lib',
|
|
'/packages/docusaurus-plugin-content-blog/lib',
|
|
'/packages/docusaurus-plugin-content-docs/lib',
|
|
'/packages/docusaurus-plugin-content-pages/lib',
|
|
'/packages/docusaurus-theme-classic/lib',
|
|
'/packages/docusaurus-theme-classic/lib-next',
|
|
'/packages/docusaurus-migrate/lib',
|
|
].concat(isWin ? windowsSpecificIgnorePatterns : []);
|
|
|
|
module.exports = {
|
|
rootDir: path.resolve(__dirname),
|
|
verbose: true,
|
|
testURL: 'http://localhost/',
|
|
testEnvironment: 'node',
|
|
testPathIgnorePatterns: ignorePatterns,
|
|
coveragePathIgnorePatterns: ignorePatterns,
|
|
transform: {
|
|
'^.+\\.[jt]sx?$': 'babel-jest',
|
|
},
|
|
setupFiles: ['./jest/stylelint-rule-test.js'],
|
|
moduleNameMapper: {
|
|
'@docusaurus/router': 'react-router-dom',
|
|
},
|
|
};
|