From 5e14714360aca5d3f7605f19a3761ff3c0eb0072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aar=C3=B3n=20Garc=C3=ADa=20Herv=C3=A1s?= Date: Wed, 26 Jun 2024 18:34:05 +0200 Subject: [PATCH] Remove createMount test util --- packages/mui-base/src/Badge/Badge.test.tsx | 4 +- packages/mui-base/src/Button/Button.test.tsx | 4 +- .../src/FormControl/FormControl.test.tsx | 4 +- packages/mui-base/src/Input/Input.test.tsx | 4 +- packages/mui-base/src/Menu/Menu.test.tsx | 8 - .../src/MenuButton/MenuButton.test.tsx | 9 +- .../mui-base/src/MenuItem/MenuItem.test.tsx | 7 +- packages/mui-base/src/Modal/Modal.test.tsx | 4 +- packages/mui-base/src/Option/Option.test.tsx | 19 +- .../src/OptionGroup/OptionGroup.test.tsx | 4 +- packages/mui-base/src/Popper/Popper.test.tsx | 4 +- packages/mui-base/src/Select/Select.test.tsx | 3 - packages/mui-base/src/Slider/Slider.test.tsx | 4 +- .../mui-base/src/Snackbar/Snackbar.test.tsx | 5 +- packages/mui-base/src/Switch/Switch.test.tsx | 4 +- packages/mui-base/src/Tab/Tab.test.tsx | 19 +- .../mui-base/src/TabPanel/TabPanel.test.tsx | 7 +- .../TablePagination/TablePagination.test.tsx | 13 +- packages/mui-base/src/Tabs/Tabs.test.tsx | 4 +- .../mui-base/src/TabsList/TabsList.test.tsx | 19 +- .../TextareaAutosize.test.tsx | 11 +- .../Unstable_NumberInput/NumberInput.test.tsx | 4 +- .../src/Unstable_Popup/Popup.test.tsx | 4 +- packages/mui-joy/src/Table/Table.test.tsx | 1 - packages/mui-material/src/Menu/Menu.test.js | 36 ++- .../mui-material/src/Popover/Popover.test.js | 61 +++-- .../src/StylesProvider/StylesProvider.test.js | 53 +++-- .../src/makeStyles/makeStyles.test.js | 215 +++++++++--------- packages/test-utils/src/createMount.tsx | 136 ----------- .../src/findOutermostIntrinsic.test.js | 68 ------ .../test-utils/src/findOutermostIntrinsic.ts | 19 -- packages/test-utils/src/index.ts | 2 - 32 files changed, 202 insertions(+), 557 deletions(-) delete mode 100644 packages/test-utils/src/createMount.tsx delete mode 100644 packages/test-utils/src/findOutermostIntrinsic.test.js delete mode 100644 packages/test-utils/src/findOutermostIntrinsic.ts diff --git a/packages/mui-base/src/Badge/Badge.test.tsx b/packages/mui-base/src/Badge/Badge.test.tsx index 141121f541adf1..8da064ca4ac42b 100644 --- a/packages/mui-base/src/Badge/Badge.test.tsx +++ b/packages/mui-base/src/Badge/Badge.test.tsx @@ -1,11 +1,10 @@ import * as React from 'react'; -import { createRenderer, createMount } from '@mui-internal/test-utils'; +import { createRenderer } from '@mui-internal/test-utils'; import { Badge, badgeClasses as classes } from '@mui/base/Badge'; import { describeConformanceUnstyled } from '../../test/describeConformanceUnstyled'; describe('', () => { const { render } = createRenderer(); - const mount = createMount(); describeConformanceUnstyled( @@ -15,7 +14,6 @@ describe('', () => { classes, inheritComponent: 'span', render, - mount, refInstanceof: window.HTMLSpanElement, testComponentPropWith: 'div', slots: { diff --git a/packages/mui-base/src/Button/Button.test.tsx b/packages/mui-base/src/Button/Button.test.tsx index 2fabf5e4a81cb7..deeedfa34b9a73 100644 --- a/packages/mui-base/src/Button/Button.test.tsx +++ b/packages/mui-base/src/Button/Button.test.tsx @@ -1,18 +1,16 @@ import * as React from 'react'; -import { act, createMount, createRenderer, fireEvent } from '@mui-internal/test-utils'; +import { act, createRenderer, fireEvent } from '@mui-internal/test-utils'; import { expect } from 'chai'; import { spy } from 'sinon'; import { Button, buttonClasses } from '@mui/base/Button'; import { describeConformanceUnstyled } from '../../test/describeConformanceUnstyled'; describe('