Skip to content

Commit

Permalink
Upgrade jest
Browse files Browse the repository at this point in the history
  • Loading branch information
darthmaim committed Dec 16, 2024
1 parent a4872e7 commit e673fd7
Show file tree
Hide file tree
Showing 4 changed files with 1,206 additions and 1,857 deletions.
5 changes: 5 additions & 0 deletions config-jest/setup/shims.js
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
require('airbnb-js-shims/target/es2019');

const { TextEncoder, TextDecoder } = require('util');

global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;
10 changes: 8 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @type {import('jest').Config} */
module.exports = {
bail: false,
collectCoverageFrom: [
Expand Down Expand Up @@ -39,8 +40,13 @@ module.exports = {
setupFiles: ['<rootDir>/config-jest/setup/shims.js', '<rootDir>/config-jest/setup/console.js'],
setupFilesAfterEnv: ['<rootDir>/config-jest/setup/enzyme.js'],
testEnvironment: 'jsdom',
testURL: 'http://localhost',
timers: 'fake',
testEnvironmentOptions: {
url: 'http://localhost',
},
fakeTimers: {
enableGlobally: true,
legacyFakeTimers: true,
},
verbose: false,
testPathIgnorePatterns: ['<rootDir>/packages/visx-demo'],
transformIgnorePatterns: [
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
"@testing-library/react-hooks": "^8.0.0",
"@testing-library/user-event": "^11.0.1",
"@types/enzyme": "^3.10.3",
"@types/jest": "^24.0.18",
"@types/jsdom": "^12.2.4",
"@types/jest": "^29.5.14",
"@types/jsdom": "^21.1.7",
"@types/node-fetch": "1.6.9",
"@types/react-test-renderer": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.46.1",
Expand All @@ -89,7 +89,7 @@
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^27.1.7",
"eslint-plugin-jest": "^28.9.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
Expand All @@ -100,7 +100,8 @@
"filesize": "6.1.0",
"fs-jetpack": "^1.3.0",
"husky": "^3.0.0",
"jest": "^25.5.4",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-mock-console": "^1.0.1",
"lerna": "^7.0.2",
"marked": "^0.7.0",
Expand Down
Loading

0 comments on commit e673fd7

Please sign in to comment.