Skip to content

Commit

Permalink
test(dev-deps): migrate from enzyme to @testing-library/react (#323)
Browse files Browse the repository at this point in the history
* test(dev-deps): remove enzyme libraries from package.json

* test(setup): remove enzyme related configuration

* test: move REACT_VERSION global declaration

* test(dev-deps): setup @testing-library/jest-dom

for more details see: https://github.com/testing-library/jest-dom#usage=

* test(jsdom env): fix issue with missing TransitionEvent

* test(enzyme): drop Placeholder without memo (needed for enzyme)

* test(enzyme): drop force upfate util

* test(enzyme): drop PassThroughProps util component

Not needed anymore, because with @testing-library/react there are no equivalent to the `setProp`. We
must use the `rerender` function and we can directly change the prop of child component in the tree
if needed.

* test(util): drop un-used user input util

* test(enzyme): migrate all tests using enzyme to @testing-library/react

* chore: bump size snapshot
  • Loading branch information
100terres committed Aug 21, 2022
1 parent 0439bd4 commit 8676466
Show file tree
Hide file tree
Showing 44 changed files with 810 additions and 1,141 deletions.
20 changes: 10 additions & 10 deletions .size-snapshot.json
@@ -1,25 +1,25 @@
{
"dnd.js": {
"bundled": 375284,
"minified": 135837,
"gzipped": 40524
"bundled": 375362,
"minified": 135899,
"gzipped": 40559
},
"dnd.min.js": {
"bundled": 306859,
"minified": 108429,
"gzipped": 31342
"bundled": 306915,
"minified": 108480,
"gzipped": 31380
},
"dnd.esm.js": {
"bundled": 242252,
"minified": 126027,
"gzipped": 32831,
"bundled": 242327,
"minified": 126101,
"gzipped": 32867,
"treeshaked": {
"rollup": {
"code": 20995,
"import_statements": 561
},
"webpack": {
"code": 24433
"code": 24493
}
}
}
Expand Down
5 changes: 1 addition & 4 deletions package.json
Expand Up @@ -111,6 +111,7 @@
"@storybook/react": "6.5.0-alpha.60",
"@storybook/theming": "6.5.0-alpha.60",
"@testing-library/dom": "8.13.0",
"@testing-library/jest-dom": "5.16.4",
"@testing-library/react": "12.1.4",
"@types/enzyme": "3.10.12",
"@types/express": "4.17.13",
Expand All @@ -129,7 +130,6 @@
"@types/seedrandom": "3.0.2",
"@typescript-eslint/eslint-plugin": "5.18.0",
"@typescript-eslint/parser": "5.18.0",
"@wojtekmaj/enzyme-adapter-react-17": "0.6.7",
"babel-jest": "27.5.1",
"babel-loader": "8.2.4",
"babel-plugin-dev-expression": "0.2.3",
Expand All @@ -140,8 +140,6 @@
"cypress": "9.5.3",
"dotenv": "16.0.0",
"emotion-theming": "11.0.0",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.6",
"eslint": "8.13.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-prettier": "8.5.0",
Expand Down Expand Up @@ -175,7 +173,6 @@
"react-16": "npm:react@16.14.0",
"react-dom": "17.0.2",
"react-dom-16": "npm:react-dom@16.14.0",
"react-test-renderer": "17.0.2",
"react-virtualized": "9.22.3",
"react-window": "1.8.6",
"release-it": "14.14.1",
Expand Down

0 comments on commit 8676466

Please sign in to comment.