refactor(website): polish on Showcase page (#5969)

This commit is contained in:
Sébastien Lorber 2021-11-20 18:31:20 +01:00 committed by GitHub
parent 63bd6b9025
commit 668f3c2506
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
68 changed files with 268 additions and 161 deletions

View file

@ -33,8 +33,9 @@ module.exports = {
},
setupFiles: ['./jest/stylelint-rule-test.js', './jest/polyfills.js'],
moduleNameMapper: {
// Jest can't resolve CSS imports
'^.+\\.css$': '<rootDir>/jest/emptyModule.js',
// Jest can't resolve CSS or asset imports
'^.+\\.(css|jpg|jpeg|png|svg)$': '<rootDir>/jest/emptyModule.js',
// TODO we need to allow Jest to resolve core Webpack aliases automatically
'@docusaurus/(browserContext|BrowserOnly|ComponentCreator|constants|docusaurusContext|ExecutionEnvironment|Head|Interpolate|isInternalUrl|Link|Noop|renderRoutes|router|Translate|use.*)':
'@docusaurus/core/lib/client/exports/$1',
@ -42,5 +43,6 @@ module.exports = {
'@generated/.*': '<rootDir>/jest/emptyModule.js',
// TODO maybe use "projects" + multiple configs if we plan to add tests to another theme?
'@theme/(.*)': '@docusaurus/theme-classic/src/theme/$1',
'@site/(.*)': 'website/$1',
},
};