mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-29 10:17:55 +02:00
chore: upgrade Jest to 28; add GitHub-actions reporter (#7243)
This commit is contained in:
parent
10a5ebecec
commit
9a1b7217ba
4 changed files with 591 additions and 468 deletions
|
@ -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',
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue