Skip to content

Commit c03202d

Browse files
committed
Replace Enzyme with React Testing Library (#1003)
1 parent 73388a8 commit c03202d

12 files changed

+561
-875
lines changed

jest.config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js",
1010
"pdfjs-dist/(.*)": "pdfjs-dist/legacy/$1"
1111
},
12-
"setupFiles": ["jest-canvas-mock", "<rootDir>/jest.setup.js"],
12+
"setupFilesAfterEnv": ["jest-canvas-mock", "@testing-library/jest-dom"],
1313
"testEnvironment": "<rootDir>/jest.env.js"
1414
}

jest.setup.js

-4
This file was deleted.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@
8888
"@babel/plugin-transform-runtime": "^7.15.0",
8989
"@babel/preset-env": "^7.15.0",
9090
"@babel/preset-react": "^7.14.0",
91-
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.0",
92-
"enzyme": "^3.10.0",
91+
"@testing-library/jest-dom": "^5.15.0",
92+
"@testing-library/react": "^12.1.0",
9393
"eslint": "^8.5.0",
9494
"eslint-config-wojtekmaj": "^0.6.5",
9595
"husky": "^7.0.0",

0 commit comments

Comments
 (0)