chore: upgrade Jest to 28; add GitHub-actions reporter (#7243)

This commit is contained in:
Joshua Chen 2022-04-27 23:47:59 +08:00 committed by GitHub
parent 10a5ebecec
commit 9a1b7217ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 591 additions and 468 deletions

View file

@ -32,7 +32,9 @@ const ignorePatterns = [
export default {
rootDir: fileURLToPath(new URL('.', import.meta.url)),
verbose: true,
testURL: 'https://docusaurus.io/',
testEnvironmentOptions: {
url: 'https://docusaurus.io/',
},
testEnvironment: 'node',
testPathIgnorePatterns: ignorePatterns,
coveragePathIgnorePatterns: [
@ -44,6 +46,7 @@ export default {
'^.+\\.[jt]sx?$': '@swc/jest',
},
errorOnDeprecated: true,
reporters: ['default', 'github-actions'],
moduleNameMapper: {
// Jest can't resolve CSS or asset imports
'^.+\\.(css|jpe?g|png|svg|webp)$': '<rootDir>/jest/emptyModule.ts',