From 00bd339fb66acea4e33cf9f1e1558fd5d009c826 Mon Sep 17 00:00:00 2001 From: Laurent Nguyen Date: Mon, 13 May 2024 12:09:01 +0200 Subject: [PATCH] Fix build issues --- package-lock.json | 21 +++++-------------- package.json | 2 +- .../DocumentsTabV2/DocumentsTabV2.test.tsx | 8 ++----- 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index fd827adf5..7c74eff9b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -130,7 +130,7 @@ "@types/datatables.net": "1.10.28", "@types/datatables.net-colreorder": "1.4.5", "@types/dom-to-image": "2.6.2", - "@types/enzyme": "3.10.18", + "@types/enzyme": "3.10.12", "@types/enzyme-adapter-react-16": "1.0.9", "@types/hasher": "0.0.31", "@types/jest": "26.0.20", @@ -12484,13 +12484,13 @@ "integrity": "sha512-PD+wqNhrjWFjAlSVd18jvChZvOXB2SOwAILBmuYev5zswBats5qmzs/QFoooLKd2omj9BT05a8MeSeRmXLGY+Q==" }, "node_modules/@types/enzyme": { - "version": "3.10.18", - "resolved": "https://registry.npmjs.org/@types/enzyme/-/enzyme-3.10.18.tgz", - "integrity": "sha512-RaO/TyyHZvXkpzinbMTZmd/S5biU4zxkvDsn22ujC29t9FMSzq8tnn8f2MxQ2P8GVhFRG5jTAL05DXKyTtpEQQ==", + "version": "3.10.12", + "resolved": "https://registry.npmjs.org/@types/enzyme/-/enzyme-3.10.12.tgz", + "integrity": "sha512-xryQlOEIe1TduDWAOphR0ihfebKFSWOXpIsk+70JskCfRfW+xALdnJ0r1ZOTo85F9Qsjk6vtlU7edTYHbls9tA==", "dev": true, "dependencies": { "@types/cheerio": "*", - "@types/react": "^16" + "@types/react": "*" } }, "node_modules/@types/enzyme-adapter-react-16": { @@ -12502,17 +12502,6 @@ "@types/enzyme": "*" } }, - "node_modules/@types/enzyme/node_modules/@types/react": { - "version": "16.14.60", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.14.60.tgz", - "integrity": "sha512-wIFmnczGsTcgwCBeIYOuy2mdXEiKZ5znU/jNOnMZPQyCcIxauMGWlX0TNG4lZ7NxRKj7YUIZRneJQSSdB2jKgg==", - "dev": true, - "dependencies": { - "@types/prop-types": "*", - "@types/scheduler": "^0.16", - "csstype": "^3.0.2" - } - }, "node_modules/@types/eslint": { "version": "8.44.7", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.7.tgz", diff --git a/package.json b/package.json index ca629c8cf..d5b335d4b 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "@types/datatables.net": "1.10.28", "@types/datatables.net-colreorder": "1.4.5", "@types/dom-to-image": "2.6.2", - "@types/enzyme": "3.10.18", + "@types/enzyme": "3.10.12", "@types/enzyme-adapter-react-16": "1.0.9", "@types/hasher": "0.0.31", "@types/jest": "26.0.20", diff --git a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.test.tsx b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.test.tsx index c727b188b..3dc2b76c8 100644 --- a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.test.tsx +++ b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.test.tsx @@ -357,9 +357,7 @@ describe("Documents tab", () => { beforeEach(() => { const props: IDocumentsTabComponentProps = createMockProps(); - // Enzyme doesn't seem to support hooks, so we need to cast the component to any - // eslint-disable-next-line @typescript-eslint/no-explicit-any - wrapper = shallow(() as any); + wrapper = shallow(); }); afterEach(() => { @@ -421,9 +419,7 @@ describe("Documents tab", () => { const props: IDocumentsTabComponentProps = createMockProps(); - // Enzyme doesn't seem to support hooks, so we need to cast the component to any - // eslint-disable-next-line @typescript-eslint/no-explicit-any - wrapper = mount(() as any); + wrapper = mount(); wrapper = await waitForComponentToPaint(wrapper); });