diff --git a/package.json b/package.json index 80a071c78895b7..af1ad51b967f9f 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,6 @@ "@babel/preset-react": "^7.24.7", "@babel/preset-typescript": "^7.24.7", "@babel/register": "^7.24.6", - "@mnajdova/enzyme-adapter-react-18": "^0.2.0", "@mui-internal/api-docs-builder": "workspace:^", "@mui-internal/api-docs-builder-core": "workspace:^", "@mui/internal-docs-utils": "workspace:^", @@ -120,7 +119,6 @@ "@octokit/rest": "^20.1.1", "@pigment-css/react": "^0.0.13", "@playwright/test": "1.44.1", - "@types/enzyme": "^3.10.18", "@types/fs-extra": "^11.0.4", "@types/lodash": "^4.17.5", "@types/mocha": "^10.0.6", @@ -142,7 +140,6 @@ "cpy-cli": "^5.0.0", "cross-env": "^7.0.3", "danger": "^12.3.1", - "enzyme": "^3.11.0", "eslint": "^8.57.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^18.0.0", diff --git a/packages-internal/test-utils/package.json b/packages-internal/test-utils/package.json index 516cc35228a51c..1c8e625f90b879 100644 --- a/packages-internal/test-utils/package.json +++ b/packages-internal/test-utils/package.json @@ -37,13 +37,11 @@ "@babel/runtime": "^7.24.7", "@emotion/cache": "^11.11.0", "@emotion/react": "^11.11.4", - "@mnajdova/enzyme-adapter-react-18": "^0.2.0", "@testing-library/dom": "^10.1.0", "@testing-library/react": "^16.0.0", "chai": "^4.4.1", "chai-dom": "^1.12.0", "dom-accessibility-api": "^0.6.3", - "enzyme": "^3.11.0", "format-util": "^1.0.5", "fs-extra": "^11.2.0", "jsdom": "^24.0.0", @@ -57,7 +55,6 @@ "devDependencies": { "@types/chai": "^4.3.16", "@types/chai-dom": "^1.11.3", - "@types/enzyme": "^3.10.18", "@types/format-util": "^1.0.4", "@types/prop-types": "^15.7.12", "@types/react": "^18.2.55", diff --git a/packages-internal/test-utils/src/init.js b/packages-internal/test-utils/src/init.js index d55b0f7f719b4f..85e2fe80a5eb6c 100644 --- a/packages-internal/test-utils/src/init.js +++ b/packages-internal/test-utils/src/init.js @@ -1,10 +1,6 @@ -import enzyme from 'enzyme'; -import Adapter from '@mnajdova/enzyme-adapter-react-18'; import * as testingLibrary from '@testing-library/react/pure'; import './initMatchers'; -enzyme.configure({ adapter: new Adapter() }); - // checking if an element is hidden is quite expensive // this is only done in CI as a fail safe. It can still explicitly be checked // in the test files which helps documenting what is part of the DOM but hidden diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 831d0c0d465769..e6da91435ec98f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -71,9 +71,6 @@ importers: '@babel/register': specifier: ^7.24.6 version: 7.24.6(@babel/core@7.24.7) - '@mnajdova/enzyme-adapter-react-18': - specifier: ^0.2.0 - version: 0.2.0(enzyme@3.11.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@mui-internal/api-docs-builder': specifier: workspace:^ version: link:packages/api-docs-builder @@ -110,9 +107,6 @@ importers: '@playwright/test': specifier: 1.44.1 version: 1.44.1 - '@types/enzyme': - specifier: ^3.10.18 - version: 3.10.18 '@types/fs-extra': specifier: ^11.0.4 version: 11.0.4 @@ -176,9 +170,6 @@ importers: danger: specifier: ^12.3.1 version: 12.3.1(encoding@0.1.13) - enzyme: - specifier: ^3.11.0 - version: 3.11.0 eslint: specifier: ^8.57.0 version: 8.57.0 @@ -1002,9 +993,6 @@ importers: '@emotion/react': specifier: ^11.11.4 version: 11.11.4(@types/react@18.2.55)(react@18.2.0) - '@mnajdova/enzyme-adapter-react-18': - specifier: ^0.2.0 - version: 0.2.0(enzyme@3.11.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@testing-library/dom': specifier: ^10.1.0 version: 10.1.0 @@ -1020,9 +1008,6 @@ importers: dom-accessibility-api: specifier: ^0.6.3 version: 0.6.3 - enzyme: - specifier: ^3.11.0 - version: 3.11.0 format-util: specifier: ^1.0.5 version: 1.0.5 @@ -1063,9 +1048,6 @@ importers: '@types/chai-dom': specifier: ^1.11.3 version: 1.11.3 - '@types/enzyme': - specifier: ^3.10.18 - version: 3.10.18 '@types/format-util': specifier: ^1.0.4 version: 1.0.4 @@ -3805,13 +3787,6 @@ packages: resolution: {integrity: sha512-JFvIYrlvR8Txa8h7VZx8VIQDltukEKOKaZL/muGO7Q/5aE2vjOKHsD/jkWYe/2uFy1xv37ubdx17O1UXQNadPg==} engines: {node: '>=18.0.0'} - '@mnajdova/enzyme-adapter-react-18@0.2.0': - resolution: {integrity: sha512-BOnjlVa7FHI1YUnYe+FdUtQu6szI1wLJ+C1lHyqmF3T9gu/J/WCYqqcD44dPkrU+8eYvvk/gQducsqna4HFiAg==} - peerDependencies: - enzyme: ^3.0.0 - react: ^18.0.0 - react-dom: ^18.0.0 - '@mui/base@5.0.0-beta.30': resolution: {integrity: sha512-dc38W4W3K42atE9nSaOeoJ7/x9wGIfawdwC/UmMxMLlZ1iSsITQ8dQJaTATCbn98YvYPINK/EH541YA5enQIPQ==} engines: {node: '>=12.0.0'} @@ -5128,9 +5103,6 @@ packages: '@types/chai@4.3.16': resolution: {integrity: sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==} - '@types/cheerio@0.22.31': - resolution: {integrity: sha512-Kt7Cdjjdi2XWSfrZ53v4Of0wG3ZcmaegFXjMmz9tfNrZSkzzo36G0AL1YqSdcIA78Etjt6E609pt5h1xnQkPUw==} - '@types/connect@3.4.35': resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} @@ -5149,9 +5121,6 @@ packages: '@types/doctrine@0.0.9': resolution: {integrity: sha512-eOIHzCUSH7SMfonMG1LsC2f8vxBFtho6NGBznK41R84YzPuvSBzrhEps33IsQiOW9+VL6NQ9DbjQJznk/S4uRA==} - '@types/enzyme@3.10.18': - resolution: {integrity: sha512-RaO/TyyHZvXkpzinbMTZmd/S5biU4zxkvDsn22ujC29t9FMSzq8tnn8f2MxQ2P8GVhFRG5jTAL05DXKyTtpEQQ==} - '@types/eslint-scope@3.7.4': resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==} @@ -5584,12 +5553,6 @@ packages: resolution: {integrity: sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==} engines: {node: '>=12'} - airbnb-prop-types@2.16.0: - resolution: {integrity: sha512-7WHOFolP/6cS96PhKNrslCLMYAI8yB1Pp6u6XmxozQOiZbsI5ycglZr5cHhBFfuRcQQjzCMith5ZPZdYiJCxUg==} - deprecated: This package has been renamed to 'prop-types-tools' - peerDependencies: - react: ^0.14 || ^15.0.0 || ^16.0.0-alpha - ajv-formats@2.1.1: resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} peerDependencies: @@ -5746,10 +5709,6 @@ packages: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} - array.prototype.filter@1.0.1: - resolution: {integrity: sha512-Dk3Ty7N42Odk7PjU/Ci3zT4pLj20YvuVnneG/58ICM6bt4Ij5kZaJTVQ9TSaWaIECX2sFyz4KItkVZqHNnciqw==} - engines: {node: '>= 0.4'} - array.prototype.find@2.2.2: resolution: {integrity: sha512-DRumkfW97iZGOfn+lIXbkVrXL04sfYKX+EfOodo8XboR5sxPDVvOjZTF/rysusa9lmhmSOeD6Vp6RKQP+eP4Tg==} @@ -6196,13 +6155,6 @@ packages: check-error@1.0.3: resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} - cheerio-select@2.1.0: - resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==} - - cheerio@1.0.0-rc.12: - resolution: {integrity: sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==} - engines: {node: '>= 6'} - chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} @@ -6914,9 +6866,6 @@ packages: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} - discontinuous-range@1.0.0: - resolution: {integrity: sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==} - dlv@1.1.3: resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} @@ -7070,17 +7019,6 @@ packages: engines: {node: '>=4'} hasBin: true - enzyme-adapter-utils@1.14.0: - resolution: {integrity: sha512-F/z/7SeLt+reKFcb7597IThpDp0bmzcH1E9Oabqv+o01cID2/YInlqHbFl7HzWBl4h3OdZYedtwNDOmSKkk0bg==} - peerDependencies: - react: 0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0 - - enzyme-shallow-equal@1.0.4: - resolution: {integrity: sha512-MttIwB8kKxypwHvRynuC3ahyNc+cFbR8mjVIltnmzQ0uKGqmsfO4bfBuLxb0beLNPhjblUEYvEbsg+VSygvF1Q==} - - enzyme@3.11.0: - resolution: {integrity: sha512-Dw8/Gs4vRjxY6/6i9wU0V+utmQO9kvh9XLnz3LIudviOnVYDEe2ec+0k+NQoMamn1VrjKgCUOWj5jG/5M5M0Qw==} - err-code@2.0.3: resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} @@ -7975,9 +7913,6 @@ packages: resolution: {integrity: sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==} engines: {node: ^16.14.0 || >=18.0.0} - html-element-map@1.3.1: - resolution: {integrity: sha512-6XMlxrAFX4UEEGxctfFnmrFaaZFNf9i5fNuV5wZ3WWQ4FVaNP1aX1LkX9j2mfEx1NpjeE/rL3nmgEn23GdFmrg==} - html-encoding-sniffer@4.0.0: resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} engines: {node: '>=18'} @@ -8013,9 +7948,6 @@ packages: htmlparser2@6.1.0: resolution: {integrity: sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==} - htmlparser2@8.0.1: - resolution: {integrity: sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==} - http-cache-semantics@4.1.1: resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} @@ -8386,9 +8318,6 @@ packages: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} - is-subset@0.1.1: - resolution: {integrity: sha512-6Ybun0IkarhmEqxXCNw/C0bna6Zb/TkfUX9UbwJtK6ObwAVCxmAP308WWTHviM/zAqXk05cdhYsUsZeGQh99iw==} - is-symbol@1.0.4: resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} engines: {node: '>= 0.4'} @@ -8924,9 +8853,6 @@ packages: lodash.difference@4.5.0: resolution: {integrity: sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==} - lodash.escape@4.0.1: - resolution: {integrity: sha512-nXEOnb/jK9g0DYMr1/Xvq6l5xMD7GDG55+GSYIYmS0G4tBk/hURD4JR9WCavs04t33WmJx9kCyp9vJ+mr4BOUw==} - lodash.escaperegexp@4.1.2: resolution: {integrity: sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==} @@ -9400,9 +9326,6 @@ packages: resolution: {integrity: sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==} engines: {node: '>=0.10.0'} - moo@0.5.1: - resolution: {integrity: sha512-I1mnb5xn4fO80BH9BLcF0yLypy2UKl+Cb01Fu0hJRkJjlCRtxZMWkTdAtDd5ZqCOxtCkhmRwyI57vWT+1iZ67w==} - mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -9449,10 +9372,6 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - nearley@2.20.1: - resolution: {integrity: sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==} - hasBin: true - negotiator@0.6.3: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} @@ -9994,9 +9913,6 @@ packages: parse-url@8.1.0: resolution: {integrity: sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w==} - parse5-htmlparser2-tree-adapter@7.0.0: - resolution: {integrity: sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==} - parse5@7.1.2: resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} @@ -10077,9 +9993,6 @@ packages: peek-stream@1.1.3: resolution: {integrity: sha512-FhJ+YbOSBb9/rIl2ZeE/QHEsWn7PqNYt8ARAY3kIgNGOk13g9FGyIY6JIl/xB/3TFRVoTv5as0l11weORrTekA==} - performance-now@2.1.0: - resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} - picocolors@0.2.1: resolution: {integrity: sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==} @@ -10358,9 +10271,6 @@ packages: resolution: {integrity: sha512-KQVDEubSUHGSt5xLakaToDFrSoZhStB8dXLzk2xvwR67gJktrHFvpR63oZgHyK19WKbHFLXJqCPXdVR3aBP8Ig==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - prop-types-exact@1.2.0: - resolution: {integrity: sha512-K+Tk3Kd9V0odiXFP9fwDHUYRyvK3Nun3GVyPapSIs5OBkITAm15W0CPFD/YKTkMUAbc0b9CUwRQp2ybiBIq+eA==} - prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} @@ -10450,19 +10360,9 @@ packages: resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} engines: {node: '>=10'} - raf@3.4.1: - resolution: {integrity: sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==} - - railroad-diagrams@1.0.0: - resolution: {integrity: sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==} - rambda@7.5.0: resolution: {integrity: sha512-y/M9weqWAH4iopRd7EHDEQQvpFPHj1AA3oHozE9tfITHUtTR7Z9PSlIRRG2l1GuW7sefC1cXFfIcF+cgnShdBA==} - randexp@0.4.6: - resolution: {integrity: sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==} - engines: {node: '>=0.12'} - randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} @@ -10805,9 +10705,6 @@ packages: resolution: {integrity: sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==} engines: {node: '>= 0.4'} - reflect.ownkeys@0.2.0: - resolution: {integrity: sha512-qOLsBKHCpSOFKK1NUOCGC5VyeufB6lEsFe92AL2bhIJsacZS1qdoOZSbPk3MYKuT2cFlRDnulKXuuElIrMjGUg==} - regenerate-unicode-properties@10.1.0: resolution: {integrity: sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==} engines: {node: '>=4'} @@ -10921,10 +10818,6 @@ packages: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} engines: {node: '>=8'} - ret@0.1.15: - resolution: {integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==} - engines: {node: '>=0.12'} - retry@0.12.0: resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} engines: {node: '>= 4'} @@ -10981,9 +10874,6 @@ packages: rrweb-cssom@0.6.0: resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} - rst-selector-parser@2.2.3: - resolution: {integrity: sha512-nDG1rZeP6oFTLN6yNDV/uiAvs1+FS/KlrEwh7+y7dpuApDBy6bI2HTBcc0/V8lv9OTqfyD34eF7au2pm8aBbhA==} - rtl-css-js@1.16.0: resolution: {integrity: sha512-Oc7PnzwIEU4M0K1J4h/7qUUaljXhQ0kCObRsZjxs2HjkpKsnoTMvSmvJ4sqgJZd0zBoEfAyTdnK/jMIYvrjySQ==} @@ -14218,22 +14108,6 @@ snapshots: - encoding - supports-color - '@mnajdova/enzyme-adapter-react-18@0.2.0(enzyme@3.11.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': - dependencies: - enzyme: 3.11.0 - enzyme-adapter-utils: 1.14.0(react@18.2.0) - enzyme-shallow-equal: 1.0.4 - has: 1.0.3 - object.assign: 4.1.5 - object.values: 1.2.0 - prop-types: 15.8.1 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - react-is: 18.2.0 - react-reconciler: 0.29.0(react@18.2.0) - react-test-renderer: 18.2.0(react@18.2.0) - semver: 5.7.2 - '@mui/base@5.0.0-beta.30(@types/react@18.2.55)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.24.7 @@ -15908,10 +15782,6 @@ snapshots: '@types/chai@4.3.16': {} - '@types/cheerio@0.22.31': - dependencies: - '@types/node': 18.19.34 - '@types/connect@3.4.35': dependencies: '@types/node': 18.19.34 @@ -15928,11 +15798,6 @@ snapshots: '@types/doctrine@0.0.9': {} - '@types/enzyme@3.10.18': - dependencies: - '@types/cheerio': 0.22.31 - '@types/react': 18.2.55 - '@types/eslint-scope@3.7.4': dependencies: '@types/eslint': 8.56.10 @@ -16453,19 +16318,6 @@ snapshots: clean-stack: 4.2.0 indent-string: 5.0.0 - airbnb-prop-types@2.16.0(react@18.2.0): - dependencies: - array.prototype.find: 2.2.2 - function.prototype.name: 1.1.6 - is-regex: 1.1.4 - object-is: 1.1.5 - object.assign: 4.1.5 - object.entries: 1.1.8 - prop-types: 15.8.1 - prop-types-exact: 1.2.0 - react: 18.2.0 - react-is: 16.13.1 - ajv-formats@2.1.1(ajv@8.12.0): optionalDependencies: ajv: 8.12.0 @@ -16643,14 +16495,6 @@ snapshots: array-union@2.1.0: {} - array.prototype.filter@1.0.1: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-array-method-boxes-properly: 1.0.0 - is-string: 1.0.7 - array.prototype.find@2.2.2: dependencies: call-bind: 1.0.7 @@ -17229,25 +17073,6 @@ snapshots: dependencies: get-func-name: 2.0.2 - cheerio-select@2.1.0: - dependencies: - boolbase: 1.0.0 - css-select: 5.1.0 - css-what: 6.1.0 - domelementtype: 2.3.0 - domhandler: 5.0.3 - domutils: 3.0.1 - - cheerio@1.0.0-rc.12: - dependencies: - cheerio-select: 2.1.0 - dom-serializer: 2.0.0 - domhandler: 5.0.3 - domutils: 3.0.1 - htmlparser2: 8.0.1 - parse5: 7.1.2 - parse5-htmlparser2-tree-adapter: 7.0.0 - chokidar@3.5.3: dependencies: anymatch: 3.1.3 @@ -18036,8 +17861,6 @@ snapshots: dependencies: path-type: 4.0.0 - discontinuous-range@1.0.0: {} - dlv@1.1.3: {} doctrine@2.1.0: @@ -18205,47 +18028,6 @@ snapshots: envinfo@7.8.1: {} - enzyme-adapter-utils@1.14.0(react@18.2.0): - dependencies: - airbnb-prop-types: 2.16.0(react@18.2.0) - function.prototype.name: 1.1.6 - has: 1.0.3 - object.assign: 4.1.5 - object.fromentries: 2.0.8 - prop-types: 15.8.1 - react: 18.2.0 - semver: 5.7.2 - - enzyme-shallow-equal@1.0.4: - dependencies: - has: 1.0.3 - object-is: 1.1.5 - - enzyme@3.11.0: - dependencies: - array.prototype.flat: 1.3.2 - cheerio: 1.0.0-rc.12 - enzyme-shallow-equal: 1.0.4 - function.prototype.name: 1.1.6 - has: 1.0.3 - html-element-map: 1.3.1 - is-boolean-object: 1.1.2 - is-callable: 1.2.7 - is-number-object: 1.0.7 - is-regex: 1.1.4 - is-string: 1.0.7 - is-subset: 0.1.1 - lodash.escape: 4.0.1 - lodash.isequal: 4.5.0 - object-inspect: 1.13.1 - object-is: 1.1.5 - object.assign: 4.1.5 - object.entries: 1.1.8 - object.values: 1.2.0 - raf: 3.4.1 - rst-selector-parser: 2.2.3 - string.prototype.trim: 1.2.9 - err-code@2.0.3: {} error-ex@1.3.2: @@ -19466,11 +19248,6 @@ snapshots: dependencies: lru-cache: 10.1.0 - html-element-map@1.3.1: - dependencies: - array.prototype.filter: 1.0.1 - call-bind: 1.0.7 - html-encoding-sniffer@4.0.0: dependencies: whatwg-encoding: 3.1.1 @@ -19514,13 +19291,6 @@ snapshots: domutils: 2.8.0 entities: 2.2.0 - htmlparser2@8.0.1: - dependencies: - domelementtype: 2.3.0 - domhandler: 5.0.3 - domutils: 3.0.1 - entities: 4.5.0 - http-cache-semantics@4.1.1: {} http-errors@2.0.0: @@ -19860,8 +19630,6 @@ snapshots: dependencies: has-tostringtag: 1.0.2 - is-subset@0.1.1: {} - is-symbol@1.0.4: dependencies: has-symbols: 1.0.3 @@ -20680,8 +20448,6 @@ snapshots: lodash.difference@4.5.0: {} - lodash.escape@4.0.1: {} - lodash.escaperegexp@4.1.2: {} lodash.find@4.6.0: {} @@ -21301,8 +21067,6 @@ snapshots: modify-values@1.0.1: {} - moo@0.5.1: {} - mri@1.2.0: {} mrmime@1.0.1: {} @@ -21342,13 +21106,6 @@ snapshots: natural-compare@1.4.0: {} - nearley@2.20.1: - dependencies: - commander: 2.20.3 - moo: 0.5.1 - railroad-diagrams: 1.0.0 - randexp: 0.4.6 - negotiator@0.6.3: {} neo-async@2.6.2: {} @@ -22047,11 +21804,6 @@ snapshots: dependencies: parse-path: 7.0.0 - parse5-htmlparser2-tree-adapter@7.0.0: - dependencies: - domhandler: 5.0.3 - parse5: 7.1.2 - parse5@7.1.2: dependencies: entities: 4.5.0 @@ -22116,8 +21868,6 @@ snapshots: duplexify: 3.7.1 through2: 2.0.5 - performance-now@2.1.0: {} - picocolors@0.2.1: {} picocolors@1.0.1: {} @@ -22383,12 +22133,6 @@ snapshots: dependencies: read: 2.1.0 - prop-types-exact@1.2.0: - dependencies: - has: 1.0.3 - object.assign: 4.1.5 - reflect.ownkeys: 0.2.0 - prop-types@15.8.1: dependencies: loose-envify: 1.4.0 @@ -22462,19 +22206,8 @@ snapshots: quick-lru@5.1.1: {} - raf@3.4.1: - dependencies: - performance-now: 2.1.0 - - railroad-diagrams@1.0.0: {} - rambda@7.5.0: {} - randexp@0.4.6: - dependencies: - discontinuous-range: 1.0.0 - ret: 0.1.15 - randombytes@2.1.0: dependencies: safe-buffer: 5.2.1 @@ -22954,8 +22687,6 @@ snapshots: globalthis: 1.0.3 which-builtin-type: 1.1.3 - reflect.ownkeys@0.2.0: {} - regenerate-unicode-properties@10.1.0: dependencies: regenerate: 1.4.2 @@ -23076,8 +22807,6 @@ snapshots: onetime: 5.1.2 signal-exit: 3.0.7 - ret@0.1.15: {} - retry@0.12.0: {} retry@0.13.1: {} @@ -23133,11 +22862,6 @@ snapshots: rrweb-cssom@0.6.0: {} - rst-selector-parser@2.2.3: - dependencies: - lodash.flattendeep: 4.4.0 - nearley: 2.20.1 - rtl-css-js@1.16.0: dependencies: '@babel/runtime': 7.24.7 diff --git a/scripts/useReactVersion.mjs b/scripts/useReactVersion.mjs index 55a4338e626f3b..35cbafdfb25608 100644 --- a/scripts/useReactVersion.mjs +++ b/scripts/useReactVersion.mjs @@ -18,12 +18,11 @@ const exec = promisify(childProcess.exec); // packages published from the react monorepo using the same version const reactPackageNames = ['react', 'react-dom', 'react-is', 'react-test-renderer', 'scheduler']; -const devDependenciesPackageNames = ['@mnajdova/enzyme-adapter-react-18', '@testing-library/react']; +const devDependenciesPackageNames = ['@testing-library/react']; // if we need to support more versions we will need to add new mapping here const additionalVersionsMappings = { 17: { - '@mnajdova/enzyme-adapter-react-18': 'npm:@eps1lon/enzyme-adapter-react-17', '@testing-library/react': '^12.1.0', }, }; @@ -82,8 +81,6 @@ async function main(version) { // At this moment all dist tags reference React 18 version, so we don't need // to update these dependencies unless an older version is used, or when the // next/experimental dist tag reference to a future version of React - // packageJson.devDependencies['@mnajdova/enzyme-adapter-react-18'] = - // 'npm:@mnajdova/enzyme-adapter-react-next'; // packageJson.devDependencies['@testing-library/react'] = 'alpha'; if (majorVersion && additionalVersionsMappings[majorVersion]) { diff --git a/test/README.md b/test/README.md index a2b90eb92f500b..fe750b8bda099f 100644 --- a/test/README.md +++ b/test/README.md @@ -18,7 +18,6 @@ Thanks for writing tests! Here's a quick run-down on our current setup. - [Karma](https://karma-runner.github.io/latest/index.html) - [Playwright](https://playwright.dev/) - [jsdom](https://github.com/jsdom/jsdom) -- [enzyme](https://airbnb.io/enzyme/) (old tests only) ## Writing tests diff --git a/test/karma.conf.js b/test/karma.conf.js index 4002f93ca893b1..8273ce1d5743bf 100644 --- a/test/karma.conf.js +++ b/test/karma.conf.js @@ -118,10 +118,6 @@ module.exports = function setKarmaConfig(config) { 'process.env.KARMA': JSON.stringify(true), 'process.env.TEST_GATE': JSON.stringify(process.env.TEST_GATE), }), - new webpack.ProvidePlugin({ - // required by enzyme > cheerio > parse5 > util - process: 'process/browser.js', - }), ], module: { rules: [ @@ -189,10 +185,6 @@ module.exports = function setKarmaConfig(config) { // needed by sourcemap fs: false, path: false, - // needed by enzyme > cheerio - stream: false, - // required by enzyme > cheerio > parse5 - util: require.resolve('util/'), vm: false, }, }, diff --git a/test/karma.conf.profile.js b/test/karma.conf.profile.js index 4482e12b7983dc..9287ccf86ba146 100644 --- a/test/karma.conf.profile.js +++ b/test/karma.conf.profile.js @@ -80,10 +80,6 @@ module.exports = function setKarmaConfig(config) { 'process.env.KARMA': JSON.stringify(true), 'process.env.TEST_GATE': JSON.stringify('enable-dispatching-profiler'), }), - new webpack.ProvidePlugin({ - // required by enzyme > cheerio > parse5 > util - process: 'process/browser.js', - }), ], module: { rules: [ @@ -108,8 +104,6 @@ module.exports = function setKarmaConfig(config) { // needed by sourcemap fs: false, path: false, - // needed by enzyme > cheerio - stream: false, }, }, // TODO: 'browserslist:modern' diff --git a/test/regressions/webpack.config.js b/test/regressions/webpack.config.js index b4472eedd1cfe4..2b4f7c9e7a60d5 100644 --- a/test/regressions/webpack.config.js +++ b/test/regressions/webpack.config.js @@ -24,10 +24,6 @@ module.exports = { }), // Avoid bundling the whole @mui/icons-material package. x2 the bundling speed. new webpack.IgnorePlugin({ resourceRegExp: /material-icons\/SearchIcons\.js/ }), - new webpack.ProvidePlugin({ - // required by enzyme > cheerio > parse5 > util - process: 'process/browser.js', - }), ], module: { rules: [ @@ -57,10 +53,6 @@ module.exports = { fallback: { // Exclude polyfill and treat 'fs' as an empty module since it is not required. next -> gzip-size relies on it. fs: false, - // needed by enzyme > cheerio - stream: false, - // required by enzyme > cheerio > parse5 - util: require.resolve('util/'), // Exclude polyfill and treat 'zlib' as an empty module since it is not required. next -> gzip-size relies on it. zlib: false, },