Skip to content

Commit

Permalink
chore: upgrade Jest to 28; add GitHub-actions reporter (#7243)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena authored Apr 27, 2022
1 parent 10a5ebe commit 9a1b721
Show file tree
Hide file tree
Showing 4 changed files with 596 additions and 473 deletions.
5 changes: 4 additions & 1 deletion jest.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand All @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions packages/docusaurus-plugin-content-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading

0 comments on commit 9a1b721

Please sign in to comment.