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',

View file

@ -95,7 +95,8 @@
"eslint-plugin-regexp": "^1.7.0",
"husky": "^7.0.4",
"image-size": "^1.0.1",
"jest": "^27.5.1",
"jest": "^28.0.0",
"jest-environment-jsdom": "^28.0.0",
"jest-serializer-react-helmet-async": "^1.0.21",
"lerna": "^4.0.0",
"lerna-changelog": "^2.2.0",

View file

@ -5,6 +5,7 @@
"main": "lib/index.js",
"sideEffects": false,
"exports": {
"./src/*": "./src/*",
"./client": "./lib/client/index.js",
"./server": "./lib/server-export.js",
".": "./lib/index.js"

1050
yarn.lock

File diff suppressed because it is too large Load diff