mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-30 10:48:05 +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 {
|
export default {
|
||||||
rootDir: fileURLToPath(new URL('.', import.meta.url)),
|
rootDir: fileURLToPath(new URL('.', import.meta.url)),
|
||||||
verbose: true,
|
verbose: true,
|
||||||
testURL: 'https://docusaurus.io/',
|
testEnvironmentOptions: {
|
||||||
|
url: 'https://docusaurus.io/',
|
||||||
|
},
|
||||||
testEnvironment: 'node',
|
testEnvironment: 'node',
|
||||||
testPathIgnorePatterns: ignorePatterns,
|
testPathIgnorePatterns: ignorePatterns,
|
||||||
coveragePathIgnorePatterns: [
|
coveragePathIgnorePatterns: [
|
||||||
|
@ -44,6 +46,7 @@ export default {
|
||||||
'^.+\\.[jt]sx?$': '@swc/jest',
|
'^.+\\.[jt]sx?$': '@swc/jest',
|
||||||
},
|
},
|
||||||
errorOnDeprecated: true,
|
errorOnDeprecated: true,
|
||||||
|
reporters: ['default', 'github-actions'],
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
// Jest can't resolve CSS or asset imports
|
// Jest can't resolve CSS or asset imports
|
||||||
'^.+\\.(css|jpe?g|png|svg|webp)$': '<rootDir>/jest/emptyModule.ts',
|
'^.+\\.(css|jpe?g|png|svg|webp)$': '<rootDir>/jest/emptyModule.ts',
|
||||||
|
|
|
@ -95,7 +95,8 @@
|
||||||
"eslint-plugin-regexp": "^1.7.0",
|
"eslint-plugin-regexp": "^1.7.0",
|
||||||
"husky": "^7.0.4",
|
"husky": "^7.0.4",
|
||||||
"image-size": "^1.0.1",
|
"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",
|
"jest-serializer-react-helmet-async": "^1.0.21",
|
||||||
"lerna": "^4.0.0",
|
"lerna": "^4.0.0",
|
||||||
"lerna-changelog": "^2.2.0",
|
"lerna-changelog": "^2.2.0",
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"exports": {
|
"exports": {
|
||||||
|
"./src/*": "./src/*",
|
||||||
"./client": "./lib/client/index.js",
|
"./client": "./lib/client/index.js",
|
||||||
"./server": "./lib/server-export.js",
|
"./server": "./lib/server-export.js",
|
||||||
".": "./lib/index.js"
|
".": "./lib/index.js"
|
||||||
|
|
Loading…
Add table
Reference in a new issue