diff --git a/.eslintrc.js b/.eslintrc.js
index e15c9c6197d333..3c8f3dccaadd85 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -211,15 +211,6 @@ module.exports = {
rules: {
// does not work with wildcard imports. Mistakes will throw at runtime anyway
'import/named': 'off',
- 'no-restricted-imports': [
- 'error',
- {
- // Use named import from `test/utils` instead.
- // The other files are private.
- patterns: ['test/utils/*'],
- },
- ],
-
'material-ui/disallow-active-element-as-key-event-target': 'error',
// upgraded level from recommended
diff --git a/.mocharc.js b/.mocharc.js
index 83a5c747ad403f..d57adb8886a831 100644
--- a/.mocharc.js
+++ b/.mocharc.js
@@ -10,7 +10,7 @@ module.exports = {
recursive: true,
timeout: (process.env.CIRCLECI === 'true' ? 5 : 2) * 1000, // Circle CI has low-performance CPUs.
reporter: 'dot',
- require: [require.resolve('./test/utils/setupBabel'), require.resolve('./test/utils/setupJSDOM')],
+ require: ['@mui-internal/test-utils/setupBabel', '@mui-internal/test-utils/setupJSDOM'],
'watch-ignore': [
// default
'.git',
diff --git a/docs/package.json b/docs/package.json
index ae72f60128c557..04a4121a2de72f 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -118,6 +118,7 @@
"@babel/plugin-transform-react-constant-elements": "^7.22.5",
"@babel/preset-typescript": "^7.22.15",
"@mui-internal/docs-utilities": "^1.0.0",
+ "@mui-internal/test-utils": "^1.0.0",
"@types/autosuggest-highlight": "^3.2.0",
"@types/chai": "^4.3.6",
"@types/css-mediaquery": "^0.1.2",
@@ -140,7 +141,6 @@
"playwright": "^1.37.1",
"prettier": "^2.8.8",
"tailwindcss": "^3.3.3",
- "test": "5.0.0",
"typescript-to-proptypes": "^5.0.0",
"yargs": "^17.7.2"
}
diff --git a/docs/src/modules/components/HighlightedCode.test.js b/docs/src/modules/components/HighlightedCode.test.js
index 737a50cb584195..8129c9ee38def0 100644
--- a/docs/src/modules/components/HighlightedCode.test.js
+++ b/docs/src/modules/components/HighlightedCode.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import { getDesignTokens } from 'docs/src/modules/brandingTheme';
import HighlightedCode from 'docs/src/modules/components/HighlightedCode';
diff --git a/package.json b/package.json
index f91171692e12cf..fa114ab4fb2885 100644
--- a/package.json
+++ b/package.json
@@ -48,9 +48,9 @@
"start": "yarn && yarn docs:dev",
"t": "node test/cli.js",
"test": "yarn eslint && yarn typescript && yarn test:coverage",
- "test:coverage": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=text mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}' 'test/utils/**/*.test.{js,ts,tsx}'",
- "test:coverage:ci": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=lcov mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}' 'test/utils/**/*.test.{js,ts,tsx}'",
- "test:coverage:html": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=html mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}' 'test/utils/**/*.test.{js,ts,tsx}'",
+ "test:coverage": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=text mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}'",
+ "test:coverage:ci": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=lcov mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}'",
+ "test:coverage:html": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=html mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}'",
"test:e2e": "cross-env NODE_ENV=production yarn test:e2e:build && concurrently --success first --kill-others \"yarn test:e2e:run\" \"yarn test:e2e:server\"",
"test:e2e:build": "webpack --config test/e2e/webpack.config.js",
"test:e2e:dev": "concurrently \"yarn test:e2e:build --watch\" \"yarn test:e2e:server\"",
@@ -66,7 +66,7 @@
"test:regressions:run": "mocha --config test/regressions/.mocharc.js --delay 'test/regressions/**/*.test.js'",
"test:regressions:server": "serve test/regressions -p 5001",
"test:umd": "node packages/mui-material/test/umd/run.js",
- "test:unit": "cross-env NODE_ENV=test mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}' 'test/utils/**/*.test.{js,ts,tsx}'",
+ "test:unit": "cross-env NODE_ENV=test mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}'",
"test:argos": "node ./scripts/pushArgos.mjs",
"typescript": "lerna run --no-bail --parallel typescript",
"typescript:ci": "lerna run --concurrency 5 --no-bail --no-sort typescript",
diff --git a/packages/eslint-plugin-material-ui/src/rules/disallow-active-elements-as-key-event-target.test.js b/packages/eslint-plugin-material-ui/src/rules/disallow-active-elements-as-key-event-target.test.js
index eb3e7a8ddead5d..785736f28d1aad 100644
--- a/packages/eslint-plugin-material-ui/src/rules/disallow-active-elements-as-key-event-target.test.js
+++ b/packages/eslint-plugin-material-ui/src/rules/disallow-active-elements-as-key-event-target.test.js
@@ -7,13 +7,13 @@ const ruleTester = new eslint.RuleTester({
});
ruleTester.run('disallow-active-element-as-key-event-target', rule, {
valid: [
- "import { fireEvent } from 'test/utils';\nfireEvent.keyDown(getByRole('button'), { key: ' ' })",
- "import { fireEvent } from 'test/utils';\nfireEvent.keyDown(document.body, { key: 'Esc' })",
- "import { fireEvent } from 'test/utils';\nfireEvent.keyUp(document.body, { key: 'Tab' })",
+ "import { fireEvent } from '@mui-internal/test-utils';\nfireEvent.keyDown(getByRole('button'), { key: ' ' })",
+ "import { fireEvent } from '@mui-internal/test-utils';\nfireEvent.keyDown(document.body, { key: 'Esc' })",
+ "import { fireEvent } from '@mui-internal/test-utils';\nfireEvent.keyUp(document.body, { key: 'Tab' })",
],
invalid: [
{
- code: "import { fireEvent } from 'test/utils';\nfireEvent.keyUp(document.activeElement, { key: 'LeftArrow' })",
+ code: "import { fireEvent } from '@mui-internal/test-utils';\nfireEvent.keyUp(document.activeElement, { key: 'LeftArrow' })",
errors: [
{
message:
@@ -23,7 +23,7 @@ ruleTester.run('disallow-active-element-as-key-event-target', rule, {
],
},
{
- code: "import { fireEvent } from 'test/utils';\nfireEvent.keyDown(document.activeElement, { key: 'DownArrow' })",
+ code: "import { fireEvent } from '@mui-internal/test-utils';\nfireEvent.keyDown(document.activeElement, { key: 'DownArrow' })",
errors: [
{
message:
@@ -54,7 +54,7 @@ ruleTester.run('disallow-active-element-as-key-event-target', rule, {
},
{
// test non-null assertion operator
- code: "import { fireEvent } from 'test/utils';\nfireEvent.keyUp(document.activeElement!, { key: 'LeftArrow' })",
+ code: "import { fireEvent } from '@mui-internal/test-utils';\nfireEvent.keyUp(document.activeElement!, { key: 'LeftArrow' })",
errors: [
{
message:
diff --git a/packages/mui-base/package.json b/packages/mui-base/package.json
index 5dd89f61e2d26d..e0fe85e6682ce7 100644
--- a/packages/mui-base/package.json
+++ b/packages/mui-base/package.json
@@ -51,6 +51,7 @@
},
"devDependencies": {
"@mui/material": "^5.14.10",
+ "@mui-internal/test-utils": "^1.0.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/chai": "^4.3.6",
@@ -63,8 +64,7 @@
"lodash": "^4.17.21",
"react": "^18.2.0",
"react-dom": "^18.2.0",
- "sinon": "^15.2.0",
- "test": "^5.0.0"
+ "sinon": "^15.2.0"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0",
diff --git a/packages/mui-base/src/Badge/Badge.test.tsx b/packages/mui-base/src/Badge/Badge.test.tsx
index e49cf7c4e487ca..06a2ab6eeba209 100644
--- a/packages/mui-base/src/Badge/Badge.test.tsx
+++ b/packages/mui-base/src/Badge/Badge.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, createMount, describeConformanceUnstyled } from 'test/utils';
+import { createRenderer, createMount, describeConformanceUnstyled } from '@mui-internal/test-utils';
import { Badge, badgeClasses as classes } from '@mui/base/Badge';
describe('', () => {
diff --git a/packages/mui-base/src/Button/Button.test.tsx b/packages/mui-base/src/Button/Button.test.tsx
index 38877a7f18c83b..cfd65c73aae6e9 100644
--- a/packages/mui-base/src/Button/Button.test.tsx
+++ b/packages/mui-base/src/Button/Button.test.tsx
@@ -5,7 +5,7 @@ import {
createRenderer,
describeConformanceUnstyled,
fireEvent,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { expect } from 'chai';
import { spy } from 'sinon';
import { Button, buttonClasses } from '@mui/base/Button';
diff --git a/packages/mui-base/src/ClickAwayListener/ClickAwayListener.test.js b/packages/mui-base/src/ClickAwayListener/ClickAwayListener.test.js
index a72f3d0da0cc76..a0032961f41db8 100644
--- a/packages/mui-base/src/ClickAwayListener/ClickAwayListener.test.js
+++ b/packages/mui-base/src/ClickAwayListener/ClickAwayListener.test.js
@@ -2,7 +2,13 @@ import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { act, createRenderer, fireEvent, fireDiscreteEvent, screen } from 'test/utils';
+import {
+ act,
+ createRenderer,
+ fireEvent,
+ fireDiscreteEvent,
+ screen,
+} from '@mui-internal/test-utils';
import { Portal } from '@mui/base/Portal';
import { ClickAwayListener } from '@mui/base/ClickAwayListener';
diff --git a/packages/mui-base/src/Dropdown/Dropdown.test.tsx b/packages/mui-base/src/Dropdown/Dropdown.test.tsx
index 1144a2290b1f46..7ce8d6d1f50102 100644
--- a/packages/mui-base/src/Dropdown/Dropdown.test.tsx
+++ b/packages/mui-base/src/Dropdown/Dropdown.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { act, createRenderer } from 'test/utils';
+import { act, createRenderer } from '@mui-internal/test-utils';
import { Dropdown } from '@mui/base/Dropdown';
import { DropdownContext } from '@mui/base/useDropdown';
import { MenuButton } from '@mui/base/MenuButton';
diff --git a/packages/mui-base/src/FocusTrap/FocusTrap.test.tsx b/packages/mui-base/src/FocusTrap/FocusTrap.test.tsx
index 54d37b3cf80f25..b7ef8a3e020440 100644
--- a/packages/mui-base/src/FocusTrap/FocusTrap.test.tsx
+++ b/packages/mui-base/src/FocusTrap/FocusTrap.test.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { expect } from 'chai';
-import { act, createRenderer, screen } from 'test/utils';
+import { act, createRenderer, screen } from '@mui-internal/test-utils';
import { FocusTrap } from '@mui/base/FocusTrap';
import { Portal } from '@mui/base/Portal';
diff --git a/packages/mui-base/src/FormControl/FormControl.test.tsx b/packages/mui-base/src/FormControl/FormControl.test.tsx
index e977ed3605f244..77e28098291c80 100644
--- a/packages/mui-base/src/FormControl/FormControl.test.tsx
+++ b/packages/mui-base/src/FormControl/FormControl.test.tsx
@@ -1,7 +1,12 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createMount, createRenderer, describeConformanceUnstyled, fireEvent } from 'test/utils';
+import {
+ createMount,
+ createRenderer,
+ describeConformanceUnstyled,
+ fireEvent,
+} from '@mui-internal/test-utils';
import { FormControl, formControlClasses, useFormControlContext } from '@mui/base/FormControl';
describe('', () => {
diff --git a/packages/mui-base/src/Input/Input.test.tsx b/packages/mui-base/src/Input/Input.test.tsx
index 59f8458827d73e..d287be11ac25cd 100644
--- a/packages/mui-base/src/Input/Input.test.tsx
+++ b/packages/mui-base/src/Input/Input.test.tsx
@@ -5,7 +5,7 @@ import {
describeConformanceUnstyled,
fireEvent,
screen,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { expect } from 'chai';
import { spy } from 'sinon';
import { Input, inputClasses } from '@mui/base/Input';
diff --git a/packages/mui-base/src/Menu/Menu.test.tsx b/packages/mui-base/src/Menu/Menu.test.tsx
index 7d2d637910bd1b..25f520d1569a2a 100644
--- a/packages/mui-base/src/Menu/Menu.test.tsx
+++ b/packages/mui-base/src/Menu/Menu.test.tsx
@@ -7,7 +7,7 @@ import {
describeConformanceUnstyled,
fireEvent,
act,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { Menu, menuClasses } from '@mui/base/Menu';
import { MenuItem } from '@mui/base/MenuItem';
import { DropdownContext, DropdownContextValue } from '@mui/base/useDropdown';
diff --git a/packages/mui-base/src/MenuButton/MenuButton.test.tsx b/packages/mui-base/src/MenuButton/MenuButton.test.tsx
index 49ec949c233d06..44e359d2087448 100644
--- a/packages/mui-base/src/MenuButton/MenuButton.test.tsx
+++ b/packages/mui-base/src/MenuButton/MenuButton.test.tsx
@@ -7,7 +7,7 @@ import {
createRenderer,
describeConformanceUnstyled,
fireEvent,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { MenuButton, menuButtonClasses } from '@mui/base/MenuButton';
import { DropdownContext, DropdownContextValue, DropdownActionTypes } from '@mui/base/useDropdown';
diff --git a/packages/mui-base/src/MenuItem/MenuItem.test.tsx b/packages/mui-base/src/MenuItem/MenuItem.test.tsx
index e9f4f8953c6882..de5ca5bf01cec8 100644
--- a/packages/mui-base/src/MenuItem/MenuItem.test.tsx
+++ b/packages/mui-base/src/MenuItem/MenuItem.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createMount, createRenderer, describeConformanceUnstyled } from 'test/utils';
+import { createMount, createRenderer, describeConformanceUnstyled } from '@mui-internal/test-utils';
import { MenuItem, menuItemClasses } from '@mui/base/MenuItem';
import { MenuProvider } from '@mui/base/useMenu';
diff --git a/packages/mui-base/src/Modal/Modal.test.tsx b/packages/mui-base/src/Modal/Modal.test.tsx
index 35061f632f30cc..701fca622fd470 100644
--- a/packages/mui-base/src/Modal/Modal.test.tsx
+++ b/packages/mui-base/src/Modal/Modal.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createMount, createRenderer, describeConformanceUnstyled } from 'test/utils';
+import { createMount, createRenderer, describeConformanceUnstyled } from '@mui-internal/test-utils';
import { Modal, modalClasses as classes, ModalRootSlotProps } from '@mui/base/Modal';
describe('', () => {
diff --git a/packages/mui-base/src/NoSsr/NoSsr.test.tsx b/packages/mui-base/src/NoSsr/NoSsr.test.tsx
index e0ccc25f82ec6e..16a1a6e3cdf9f1 100644
--- a/packages/mui-base/src/NoSsr/NoSsr.test.tsx
+++ b/packages/mui-base/src/NoSsr/NoSsr.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { NoSsr } from '@mui/base/NoSsr';
describe('', () => {
diff --git a/packages/mui-base/src/Option/Option.test.tsx b/packages/mui-base/src/Option/Option.test.tsx
index 9a9d294939919c..d34b4b7040ef9f 100644
--- a/packages/mui-base/src/Option/Option.test.tsx
+++ b/packages/mui-base/src/Option/Option.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createMount, createRenderer, describeConformanceUnstyled } from 'test/utils';
+import { createMount, createRenderer, describeConformanceUnstyled } from '@mui-internal/test-utils';
import { Option, optionClasses } from '@mui/base/Option';
import { SelectProvider } from '../useSelect/SelectProvider';
diff --git a/packages/mui-base/src/OptionGroup/OptionGroup.test.tsx b/packages/mui-base/src/OptionGroup/OptionGroup.test.tsx
index 320687241f5242..6e8e5f20ee190c 100644
--- a/packages/mui-base/src/OptionGroup/OptionGroup.test.tsx
+++ b/packages/mui-base/src/OptionGroup/OptionGroup.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createMount, createRenderer, describeConformanceUnstyled } from 'test/utils';
+import { createMount, createRenderer, describeConformanceUnstyled } from '@mui-internal/test-utils';
import { OptionGroup, optionGroupClasses } from '@mui/base/OptionGroup';
describe('', () => {
diff --git a/packages/mui-base/src/Popper/Popper.test.tsx b/packages/mui-base/src/Popper/Popper.test.tsx
index 194972e0a63c4f..404c4bbc822131 100644
--- a/packages/mui-base/src/Popper/Popper.test.tsx
+++ b/packages/mui-base/src/Popper/Popper.test.tsx
@@ -1,6 +1,11 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, createMount, describeConformanceUnstyled, screen } from 'test/utils';
+import {
+ createRenderer,
+ createMount,
+ describeConformanceUnstyled,
+ screen,
+} from '@mui-internal/test-utils';
import { Popper, popperClasses } from '@mui/base/Popper';
describe('', () => {
diff --git a/packages/mui-base/src/Portal/Portal.test.tsx b/packages/mui-base/src/Portal/Portal.test.tsx
index 382af766bfae9c..2d0091ac5539fb 100644
--- a/packages/mui-base/src/Portal/Portal.test.tsx
+++ b/packages/mui-base/src/Portal/Portal.test.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { Portal, PortalProps } from '@mui/base/Portal';
describe('', () => {
diff --git a/packages/mui-base/src/Select/Select.test.tsx b/packages/mui-base/src/Select/Select.test.tsx
index 3511327037c924..145bfe0ae4e002 100644
--- a/packages/mui-base/src/Select/Select.test.tsx
+++ b/packages/mui-base/src/Select/Select.test.tsx
@@ -9,7 +9,7 @@ import {
userEvent,
act,
screen,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { Select, SelectListboxSlotProps, selectClasses } from '@mui/base/Select';
import { useOption, SelectOption } from '@mui/base/useOption';
import { Option, OptionProps, optionClasses } from '@mui/base/Option';
diff --git a/packages/mui-base/src/Slider/Slider.test.tsx b/packages/mui-base/src/Slider/Slider.test.tsx
index 787b7ddd2e1b85..8905a763709add 100644
--- a/packages/mui-base/src/Slider/Slider.test.tsx
+++ b/packages/mui-base/src/Slider/Slider.test.tsx
@@ -8,7 +8,7 @@ import {
describeConformanceUnstyled,
fireEvent,
screen,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import {
Slider,
sliderClasses as classes,
diff --git a/packages/mui-base/src/Snackbar/Snackbar.test.tsx b/packages/mui-base/src/Snackbar/Snackbar.test.tsx
index 11f1a5431e74e2..0f4fe6824ffbf2 100644
--- a/packages/mui-base/src/Snackbar/Snackbar.test.tsx
+++ b/packages/mui-base/src/Snackbar/Snackbar.test.tsx
@@ -7,7 +7,7 @@ import {
createMount,
describeConformanceUnstyled,
fireEvent,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { Snackbar, snackbarClasses as classes } from '@mui/base/Snackbar';
describe('', () => {
diff --git a/packages/mui-base/src/Switch/Switch.test.tsx b/packages/mui-base/src/Switch/Switch.test.tsx
index 65b603e83a347d..6861f25b3b779d 100644
--- a/packages/mui-base/src/Switch/Switch.test.tsx
+++ b/packages/mui-base/src/Switch/Switch.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createMount, createRenderer, describeConformanceUnstyled } from 'test/utils';
+import { createMount, createRenderer, describeConformanceUnstyled } from '@mui-internal/test-utils';
import { expect } from 'chai';
import { Switch, SwitchOwnerState, switchClasses } from '@mui/base/Switch';
diff --git a/packages/mui-base/src/Tab/Tab.test.tsx b/packages/mui-base/src/Tab/Tab.test.tsx
index 056cbf45483e74..9f03a094bb4c24 100644
--- a/packages/mui-base/src/Tab/Tab.test.tsx
+++ b/packages/mui-base/src/Tab/Tab.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createMount, createRenderer, describeConformanceUnstyled } from 'test/utils';
+import { createMount, createRenderer, describeConformanceUnstyled } from '@mui-internal/test-utils';
import { Tab, tabClasses } from '@mui/base/Tab';
import { TabsListProvider, TabsListProviderValue } from '../useTabsList';
import { TabsContext } from '../Tabs';
diff --git a/packages/mui-base/src/TabPanel/TabPanel.test.tsx b/packages/mui-base/src/TabPanel/TabPanel.test.tsx
index 453984c6c60334..5be5722b97017d 100644
--- a/packages/mui-base/src/TabPanel/TabPanel.test.tsx
+++ b/packages/mui-base/src/TabPanel/TabPanel.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createMount, createRenderer, describeConformanceUnstyled } from 'test/utils';
+import { createMount, createRenderer, describeConformanceUnstyled } from '@mui-internal/test-utils';
import { TabPanel, tabPanelClasses } from '@mui/base/TabPanel';
import { TabsProvider, TabsProviderValue } from '../useTabs';
diff --git a/packages/mui-base/src/TablePagination/TablePagination.test.tsx b/packages/mui-base/src/TablePagination/TablePagination.test.tsx
index fb55ab9d930756..813898a236b710 100644
--- a/packages/mui-base/src/TablePagination/TablePagination.test.tsx
+++ b/packages/mui-base/src/TablePagination/TablePagination.test.tsx
@@ -2,7 +2,12 @@ import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
import PropTypes from 'prop-types';
-import { describeConformanceUnstyled, fireEvent, createRenderer, createMount } from 'test/utils';
+import {
+ describeConformanceUnstyled,
+ fireEvent,
+ createRenderer,
+ createMount,
+} from '@mui-internal/test-utils';
import TableFooter from '@mui/material/TableFooter';
import TableRow from '@mui/material/TableRow';
import {
diff --git a/packages/mui-base/src/Tabs/Tabs.test.tsx b/packages/mui-base/src/Tabs/Tabs.test.tsx
index 564a59877784c8..8096e1404054d5 100644
--- a/packages/mui-base/src/Tabs/Tabs.test.tsx
+++ b/packages/mui-base/src/Tabs/Tabs.test.tsx
@@ -8,7 +8,7 @@ import {
fireEvent,
screen,
createMount,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { Tab } from '@mui/base/Tab';
import { Tabs, tabsClasses as classes, TabsProps } from '@mui/base/Tabs';
import { TabsList } from '@mui/base/TabsList';
diff --git a/packages/mui-base/src/TabsList/TabsList.test.tsx b/packages/mui-base/src/TabsList/TabsList.test.tsx
index 2294d482656af6..0c547161abe083 100644
--- a/packages/mui-base/src/TabsList/TabsList.test.tsx
+++ b/packages/mui-base/src/TabsList/TabsList.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createMount, createRenderer, describeConformanceUnstyled } from 'test/utils';
+import { createMount, createRenderer, describeConformanceUnstyled } from '@mui-internal/test-utils';
import { TabsContext } from '@mui/base/Tabs';
import { TabsList, tabsListClasses } from '@mui/base/TabsList';
diff --git a/packages/mui-base/src/TextareaAutosize/TextareaAutosize.test.tsx b/packages/mui-base/src/TextareaAutosize/TextareaAutosize.test.tsx
index 3d70576baacd46..76db8c8d003cd9 100644
--- a/packages/mui-base/src/TextareaAutosize/TextareaAutosize.test.tsx
+++ b/packages/mui-base/src/TextareaAutosize/TextareaAutosize.test.tsx
@@ -10,7 +10,7 @@ import {
createRenderer,
fireEvent,
strictModeDoubleLoggingSuppressed,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { TextareaAutosize } from '@mui/base/TextareaAutosize';
function getStyleValue(value: string) {
diff --git a/packages/mui-base/src/Unstable_NumberInput/NumberInput.test.tsx b/packages/mui-base/src/Unstable_NumberInput/NumberInput.test.tsx
index 968b5dc55b5fce..2137df1b057c9d 100644
--- a/packages/mui-base/src/Unstable_NumberInput/NumberInput.test.tsx
+++ b/packages/mui-base/src/Unstable_NumberInput/NumberInput.test.tsx
@@ -8,7 +8,7 @@ import {
createRenderer,
describeConformanceUnstyled,
fireEvent,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import {
Unstable_NumberInput as NumberInput,
numberInputClasses,
diff --git a/packages/mui-base/src/Unstable_Popup/Popup.test.tsx b/packages/mui-base/src/Unstable_Popup/Popup.test.tsx
index 958b6d9be06c84..a0d7d3b4b7598d 100644
--- a/packages/mui-base/src/Unstable_Popup/Popup.test.tsx
+++ b/packages/mui-base/src/Unstable_Popup/Popup.test.tsx
@@ -7,7 +7,7 @@ import {
describeConformanceUnstyled,
screen,
fireEvent,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import {
Unstable_Popup as Popup,
popupClasses,
diff --git a/packages/mui-base/src/unstable_useNumberInput/useNumberInput.test.tsx b/packages/mui-base/src/unstable_useNumberInput/useNumberInput.test.tsx
index 53946ece059bdb..3163a2878f98ba 100644
--- a/packages/mui-base/src/unstable_useNumberInput/useNumberInput.test.tsx
+++ b/packages/mui-base/src/unstable_useNumberInput/useNumberInput.test.tsx
@@ -2,7 +2,7 @@ import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
import userEvent from '@testing-library/user-event';
-import { createRenderer, screen } from 'test/utils';
+import { createRenderer, screen } from '@mui-internal/test-utils';
import {
unstable_useNumberInput as useNumberInput,
UseNumberInputParameters,
diff --git a/packages/mui-base/src/useAutocomplete/useAutocomplete.test.js b/packages/mui-base/src/useAutocomplete/useAutocomplete.test.js
index 5ae4fc1a476188..0386731e59eeb8 100644
--- a/packages/mui-base/src/useAutocomplete/useAutocomplete.test.js
+++ b/packages/mui-base/src/useAutocomplete/useAutocomplete.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, screen, ErrorBoundary, act, fireEvent } from 'test/utils';
+import { createRenderer, screen, ErrorBoundary, act, fireEvent } from '@mui-internal/test-utils';
import { spy } from 'sinon';
import { useAutocomplete, createFilterOptions } from '@mui/base/useAutocomplete';
diff --git a/packages/mui-base/src/useButton/useButton.test.tsx b/packages/mui-base/src/useButton/useButton.test.tsx
index a0315a28a60ef9..860114c3eba9fb 100644
--- a/packages/mui-base/src/useButton/useButton.test.tsx
+++ b/packages/mui-base/src/useButton/useButton.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { act, createRenderer, fireEvent } from 'test/utils';
+import { act, createRenderer, fireEvent } from '@mui-internal/test-utils';
import { expect } from 'chai';
import { spy } from 'sinon';
import { useButton } from '@mui/base/useButton';
diff --git a/packages/mui-base/src/useInput/useInput.test.tsx b/packages/mui-base/src/useInput/useInput.test.tsx
index 8cf1ef0b52f0c2..8f6622c2b36949 100644
--- a/packages/mui-base/src/useInput/useInput.test.tsx
+++ b/packages/mui-base/src/useInput/useInput.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { act, createRenderer } from 'test/utils';
+import { act, createRenderer } from '@mui-internal/test-utils';
import { expect } from 'chai';
import { spy } from 'sinon';
import { useInput } from './useInput';
diff --git a/packages/mui-base/src/useList/useList.test.tsx b/packages/mui-base/src/useList/useList.test.tsx
index 31689bb6e4a82e..7e8ffa6f1ce2fb 100644
--- a/packages/mui-base/src/useList/useList.test.tsx
+++ b/packages/mui-base/src/useList/useList.test.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { SinonSpy, spy } from 'sinon';
-import { createRenderer, createEvent, fireEvent } from 'test/utils';
+import { createRenderer, createEvent, fireEvent } from '@mui-internal/test-utils';
import { useList } from './useList';
describe('useList', () => {
diff --git a/packages/mui-base/src/useMenu/useMenu.test.js b/packages/mui-base/src/useMenu/useMenu.test.js
index 589f5b04c07bfa..d3973de7d06f3f 100644
--- a/packages/mui-base/src/useMenu/useMenu.test.js
+++ b/packages/mui-base/src/useMenu/useMenu.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer, screen, fireEvent } from 'test/utils';
+import { createRenderer, screen, fireEvent } from '@mui-internal/test-utils';
import { MenuItem } from '../MenuItem';
import { useMenu } from './useMenu';
diff --git a/packages/mui-base/src/useMenuButton/useMenuButton.test.tsx b/packages/mui-base/src/useMenuButton/useMenuButton.test.tsx
index a732764606a58a..d14beef942ad9a 100644
--- a/packages/mui-base/src/useMenuButton/useMenuButton.test.tsx
+++ b/packages/mui-base/src/useMenuButton/useMenuButton.test.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer, screen, fireEvent } from 'test/utils';
+import { createRenderer, screen, fireEvent } from '@mui-internal/test-utils';
import { DropdownContext, DropdownContextValue } from '@mui/base/useDropdown';
import { useMenuButton } from './useMenuButton';
diff --git a/packages/mui-base/src/useMenuItem/useMenuItem.test.tsx b/packages/mui-base/src/useMenuItem/useMenuItem.test.tsx
index 0b9d51fe974882..a599bfb52ae110 100644
--- a/packages/mui-base/src/useMenuItem/useMenuItem.test.tsx
+++ b/packages/mui-base/src/useMenuItem/useMenuItem.test.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer, screen, fireEvent } from 'test/utils';
+import { createRenderer, screen, fireEvent } from '@mui-internal/test-utils';
import { Menu } from '../Menu';
import { useMenuItem } from './useMenuItem';
diff --git a/packages/mui-base/src/useSnackbar/useSnackbar.test.tsx b/packages/mui-base/src/useSnackbar/useSnackbar.test.tsx
index c3608906ab554c..6ee48a71e0e017 100644
--- a/packages/mui-base/src/useSnackbar/useSnackbar.test.tsx
+++ b/packages/mui-base/src/useSnackbar/useSnackbar.test.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { fireEvent, createRenderer } from 'test/utils';
+import { fireEvent, createRenderer } from '@mui-internal/test-utils';
import { useSnackbar, UseSnackbarParameters } from '@mui/base/useSnackbar';
describe('useSnackbar', () => {
diff --git a/packages/mui-base/src/useSwitch/useSwitch.test.tsx b/packages/mui-base/src/useSwitch/useSwitch.test.tsx
index 194f05069afabe..0414f65ba3d0c2 100644
--- a/packages/mui-base/src/useSwitch/useSwitch.test.tsx
+++ b/packages/mui-base/src/useSwitch/useSwitch.test.tsx
@@ -8,7 +8,7 @@ import {
programmaticFocusTriggersFocusVisible,
screen,
simulatePointerDevice,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { useSwitch, UseSwitchParameters } from '@mui/base/useSwitch';
describe('useSwitch', () => {
diff --git a/packages/mui-base/src/utils/ClassNameConfigurator.test.tsx b/packages/mui-base/src/utils/ClassNameConfigurator.test.tsx
index 27a38e3a1611d5..85d6db68f7d791 100644
--- a/packages/mui-base/src/utils/ClassNameConfigurator.test.tsx
+++ b/packages/mui-base/src/utils/ClassNameConfigurator.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { expect } from 'chai';
import { Switch, switchClasses } from '@mui/base/Switch';
import { ClassNameConfigurator } from '@mui/base/utils/ClassNameConfigurator';
diff --git a/packages/mui-base/src/utils/prepareForSlot.test.tsx b/packages/mui-base/src/utils/prepareForSlot.test.tsx
index 29fe298bde164a..7b26144b2e6e79 100644
--- a/packages/mui-base/src/utils/prepareForSlot.test.tsx
+++ b/packages/mui-base/src/utils/prepareForSlot.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { Button } from '@mui/base/Button';
import { prepareForSlot } from './prepareForSlot';
diff --git a/packages/mui-base/src/utils/useCompound.test.tsx b/packages/mui-base/src/utils/useCompound.test.tsx
index a7214fda0efc54..8a0361fa7e7d42 100644
--- a/packages/mui-base/src/utils/useCompound.test.tsx
+++ b/packages/mui-base/src/utils/useCompound.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { render } from 'test/utils';
+import { render } from '@mui-internal/test-utils';
import { CompoundComponentContext, useCompoundParent } from './useCompound';
import { useCompoundItem } from './useCompoundItem';
diff --git a/packages/mui-base/src/utils/useControllableReducer.test.tsx b/packages/mui-base/src/utils/useControllableReducer.test.tsx
index 87b4b1204b7a29..e6a77bd08eaacb 100644
--- a/packages/mui-base/src/utils/useControllableReducer.test.tsx
+++ b/packages/mui-base/src/utils/useControllableReducer.test.tsx
@@ -1,7 +1,7 @@
import { expect } from 'chai';
import * as React from 'react';
import { spy } from 'sinon';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { useControllableReducer } from './useControllableReducer';
import { ControllableReducerParameters } from './useControllableReducer.types';
diff --git a/packages/mui-base/src/utils/useSlotProps.test.tsx b/packages/mui-base/src/utils/useSlotProps.test.tsx
index 600ba65a066e50..367aeba5ee67cb 100644
--- a/packages/mui-base/src/utils/useSlotProps.test.tsx
+++ b/packages/mui-base/src/utils/useSlotProps.test.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { EventHandlers } from '@mui/base';
import { useSlotProps, UseSlotPropsParameters, UseSlotPropsResult } from './useSlotProps';
diff --git a/packages/mui-joy/package.json b/packages/mui-joy/package.json
index a09b5f0058afd1..39f0a357baa5a4 100644
--- a/packages/mui-joy/package.json
+++ b/packages/mui-joy/package.json
@@ -49,6 +49,7 @@
},
"devDependencies": {
"@mui/material": "^5.14.10",
+ "@mui-internal/test-utils": "^1.0.0",
"@types/chai": "^4.3.6",
"@types/prop-types": "^15.7.5",
"@types/react": "^18.2.21",
@@ -60,8 +61,7 @@
"next": "^13.4.19",
"react": "^18.2.0",
"react-dom": "^18.2.0",
- "sinon": "^15.2.0",
- "test": "^5.0.0"
+ "sinon": "^15.2.0"
},
"peerDependencies": {
"@emotion/react": "^11.5.0",
diff --git a/packages/mui-joy/src/Accordion/Accordion.test.tsx b/packages/mui-joy/src/Accordion/Accordion.test.tsx
index f6139486246885..a26905361028b5 100644
--- a/packages/mui-joy/src/Accordion/Accordion.test.tsx
+++ b/packages/mui-joy/src/Accordion/Accordion.test.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer, describeConformance, fireEvent } from 'test/utils';
+import { createRenderer, describeConformance, fireEvent } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import Accordion, { accordionClasses as classes } from '@mui/joy/Accordion';
import AccordionSummary from '@mui/joy/AccordionSummary';
diff --git a/packages/mui-joy/src/AccordionDetails/AccordionDetails.test.tsx b/packages/mui-joy/src/AccordionDetails/AccordionDetails.test.tsx
index 2051ac9c97a0a2..5afd57b2794f3f 100644
--- a/packages/mui-joy/src/AccordionDetails/AccordionDetails.test.tsx
+++ b/packages/mui-joy/src/AccordionDetails/AccordionDetails.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, fireEvent, screen } from 'test/utils';
+import { createRenderer, describeConformance, fireEvent, screen } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import Accordion from '@mui/joy/Accordion';
import AccordionSummary from '@mui/joy/AccordionSummary';
diff --git a/packages/mui-joy/src/AccordionGroup/AccordionGroup.test.tsx b/packages/mui-joy/src/AccordionGroup/AccordionGroup.test.tsx
index abb5e61b810f29..50dbfbd9de058d 100644
--- a/packages/mui-joy/src/AccordionGroup/AccordionGroup.test.tsx
+++ b/packages/mui-joy/src/AccordionGroup/AccordionGroup.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, describeJoyColorInversion } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import AccordionGroup, { accordionGroupClasses as classes } from '@mui/joy/AccordionGroup';
diff --git a/packages/mui-joy/src/AccordionSummary/AccordionSummary.test.tsx b/packages/mui-joy/src/AccordionSummary/AccordionSummary.test.tsx
index 38e6992b813812..4c21ff09e95ce4 100644
--- a/packages/mui-joy/src/AccordionSummary/AccordionSummary.test.tsx
+++ b/packages/mui-joy/src/AccordionSummary/AccordionSummary.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import AccordionSummary, { accordionSummaryClasses as classes } from '@mui/joy/AccordionSummary';
diff --git a/packages/mui-joy/src/Alert/Alert.test.tsx b/packages/mui-joy/src/Alert/Alert.test.tsx
index 8edc33de165dd9..58003f6ebe9363 100644
--- a/packages/mui-joy/src/Alert/Alert.test.tsx
+++ b/packages/mui-joy/src/Alert/Alert.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, describeJoyColorInversion } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import Alert, { AlertClassKey, alertClasses as classes } from '@mui/joy/Alert';
diff --git a/packages/mui-joy/src/AspectRatio/AspectRatio.test.tsx b/packages/mui-joy/src/AspectRatio/AspectRatio.test.tsx
index 5dc77a5ba452fb..855482a1a59530 100644
--- a/packages/mui-joy/src/AspectRatio/AspectRatio.test.tsx
+++ b/packages/mui-joy/src/AspectRatio/AspectRatio.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, describeJoyColorInversion } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import AspectRatio, {
diff --git a/packages/mui-joy/src/Autocomplete/Autocomplete.test.tsx b/packages/mui-joy/src/Autocomplete/Autocomplete.test.tsx
index 1c3da3551ba3b0..4fbe3908ea0834 100644
--- a/packages/mui-joy/src/Autocomplete/Autocomplete.test.tsx
+++ b/packages/mui-joy/src/Autocomplete/Autocomplete.test.tsx
@@ -10,7 +10,7 @@ import {
fireEvent,
strictModeDoubleLoggingSuppressed,
describeJoyColorInversion,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import Autocomplete, {
autocompleteClasses as classes,
createFilterOptions,
diff --git a/packages/mui-joy/src/AutocompleteListbox/AutocompleteListbox.test.tsx b/packages/mui-joy/src/AutocompleteListbox/AutocompleteListbox.test.tsx
index 5a134270a0dddb..d2aa9408bbc062 100644
--- a/packages/mui-joy/src/AutocompleteListbox/AutocompleteListbox.test.tsx
+++ b/packages/mui-joy/src/AutocompleteListbox/AutocompleteListbox.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, describeJoyColorInversion } from 'test/utils';
+import {
+ describeConformance,
+ createRenderer,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import AutocompleteListbox, {
autocompleteListboxClasses as classes,
diff --git a/packages/mui-joy/src/AutocompleteOption/AutocompleteOption.test.tsx b/packages/mui-joy/src/AutocompleteOption/AutocompleteOption.test.tsx
index 30337a4f1c2664..2e3cbd1519b956 100644
--- a/packages/mui-joy/src/AutocompleteOption/AutocompleteOption.test.tsx
+++ b/packages/mui-joy/src/AutocompleteOption/AutocompleteOption.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, describeJoyColorInversion } from 'test/utils';
+import {
+ describeConformance,
+ createRenderer,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import AutocompleteOption, {
autocompleteOptionClasses as classes,
diff --git a/packages/mui-joy/src/Avatar/Avatar.test.tsx b/packages/mui-joy/src/Avatar/Avatar.test.tsx
index e37db3caf2b486..c1d9bf1be2aabf 100644
--- a/packages/mui-joy/src/Avatar/Avatar.test.tsx
+++ b/packages/mui-joy/src/Avatar/Avatar.test.tsx
@@ -6,7 +6,7 @@ import {
describeConformance,
describeJoyColorInversion,
fireEvent,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import Avatar, { AvatarClassKey, avatarClasses as classes } from '@mui/joy/Avatar';
diff --git a/packages/mui-joy/src/AvatarGroup/AvatarGroup.test.tsx b/packages/mui-joy/src/AvatarGroup/AvatarGroup.test.tsx
index 3b66ccbf96c150..debab8f46265ea 100644
--- a/packages/mui-joy/src/AvatarGroup/AvatarGroup.test.tsx
+++ b/packages/mui-joy/src/AvatarGroup/AvatarGroup.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import AvatarGroup, { avatarGroupClasses as classes } from '@mui/joy/AvatarGroup';
import Avatar, { avatarClasses } from '@mui/joy/Avatar';
diff --git a/packages/mui-joy/src/Badge/Badge.test.tsx b/packages/mui-joy/src/Badge/Badge.test.tsx
index 13921cb3f5d864..672b81c87d3ae2 100644
--- a/packages/mui-joy/src/Badge/Badge.test.tsx
+++ b/packages/mui-joy/src/Badge/Badge.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, describeJoyColorInversion } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import Badge, { BadgeClassKey, BadgeOrigin, badgeClasses as classes } from '@mui/joy/Badge';
diff --git a/packages/mui-joy/src/Box/Box.test.tsx b/packages/mui-joy/src/Box/Box.test.tsx
index 552cdfa3b30d23..ac4108897d991c 100644
--- a/packages/mui-joy/src/Box/Box.test.tsx
+++ b/packages/mui-joy/src/Box/Box.test.tsx
@@ -1,7 +1,7 @@
/* eslint-disable material-ui/no-empty-box */
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { ThemeProvider, CssVarsProvider, extendTheme, PalettePrimary } from '@mui/joy/styles';
import { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/joy/className';
import Box from '@mui/joy/Box';
diff --git a/packages/mui-joy/src/Breadcrumbs/Breadcrumbs.test.tsx b/packages/mui-joy/src/Breadcrumbs/Breadcrumbs.test.tsx
index 4768e6c84d5edb..937ad578eb4e2a 100644
--- a/packages/mui-joy/src/Breadcrumbs/Breadcrumbs.test.tsx
+++ b/packages/mui-joy/src/Breadcrumbs/Breadcrumbs.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import Breadcrumbs, {
diff --git a/packages/mui-joy/src/Button/Button.test.tsx b/packages/mui-joy/src/Button/Button.test.tsx
index 0770d8664f43b2..69d504e45780d3 100644
--- a/packages/mui-joy/src/Button/Button.test.tsx
+++ b/packages/mui-joy/src/Button/Button.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, describeJoyColorInversion } from 'test/utils';
+import {
+ describeConformance,
+ createRenderer,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import Button, { buttonClasses as classes } from '@mui/joy/Button';
import { ThemeProvider } from '@mui/joy/styles';
diff --git a/packages/mui-joy/src/ButtonGroup/ButtonGroup.test.tsx b/packages/mui-joy/src/ButtonGroup/ButtonGroup.test.tsx
index a709c1e23ab5fc..f18621a9955fd6 100644
--- a/packages/mui-joy/src/ButtonGroup/ButtonGroup.test.tsx
+++ b/packages/mui-joy/src/ButtonGroup/ButtonGroup.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import ButtonGroup, {
diff --git a/packages/mui-joy/src/Card/Card.test.tsx b/packages/mui-joy/src/Card/Card.test.tsx
index ae773620f6869e..88272f6688a1c5 100644
--- a/packages/mui-joy/src/Card/Card.test.tsx
+++ b/packages/mui-joy/src/Card/Card.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, describeJoyColorInversion } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import Card, { cardClasses as classes, CardClassKey } from '@mui/joy/Card';
diff --git a/packages/mui-joy/src/CardActions/CardActions.test.tsx b/packages/mui-joy/src/CardActions/CardActions.test.tsx
index d128e67c0f692f..3a5f0f6bc8b499 100644
--- a/packages/mui-joy/src/CardActions/CardActions.test.tsx
+++ b/packages/mui-joy/src/CardActions/CardActions.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import CardActions, { cardActionsClasses as classes } from '@mui/joy/CardActions';
diff --git a/packages/mui-joy/src/CardContent/CardContent.test.tsx b/packages/mui-joy/src/CardContent/CardContent.test.tsx
index bcedfa180b8f33..f457f9260369da 100644
--- a/packages/mui-joy/src/CardContent/CardContent.test.tsx
+++ b/packages/mui-joy/src/CardContent/CardContent.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import CardContent, { cardContentClasses as classes } from '@mui/joy/CardContent';
diff --git a/packages/mui-joy/src/CardCover/CardCover.test.tsx b/packages/mui-joy/src/CardCover/CardCover.test.tsx
index ec5b940bf75130..8c3a228d56ab79 100644
--- a/packages/mui-joy/src/CardCover/CardCover.test.tsx
+++ b/packages/mui-joy/src/CardCover/CardCover.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import CardCover, { cardCoverClasses as classes } from '@mui/joy/CardCover';
diff --git a/packages/mui-joy/src/CardOverflow/CardOverflow.test.tsx b/packages/mui-joy/src/CardOverflow/CardOverflow.test.tsx
index 0a677d2469d4da..33619311553c68 100644
--- a/packages/mui-joy/src/CardOverflow/CardOverflow.test.tsx
+++ b/packages/mui-joy/src/CardOverflow/CardOverflow.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, describeJoyColorInversion } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import CardOverflow, {
diff --git a/packages/mui-joy/src/Checkbox/Checkbox.test.tsx b/packages/mui-joy/src/Checkbox/Checkbox.test.tsx
index 61c396d2840a17..a52ee390e075a6 100644
--- a/packages/mui-joy/src/Checkbox/Checkbox.test.tsx
+++ b/packages/mui-joy/src/Checkbox/Checkbox.test.tsx
@@ -6,7 +6,7 @@ import {
createRenderer,
fireEvent,
describeJoyColorInversion,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import Checkbox, { checkboxClasses as classes } from '@mui/joy/Checkbox';
import { ThemeProvider } from '@mui/joy/styles';
import CloseIcon from '../internal/svg-icons/Close';
diff --git a/packages/mui-joy/src/Chip/Chip.test.tsx b/packages/mui-joy/src/Chip/Chip.test.tsx
index 1a45600c0ecb88..952079d7dd80a6 100644
--- a/packages/mui-joy/src/Chip/Chip.test.tsx
+++ b/packages/mui-joy/src/Chip/Chip.test.tsx
@@ -6,7 +6,7 @@ import {
describeConformance,
describeJoyColorInversion,
fireEvent,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import Chip, { ChipClassKey, chipClasses as classes } from '@mui/joy/Chip';
diff --git a/packages/mui-joy/src/ChipDelete/ChipDelete.test.tsx b/packages/mui-joy/src/ChipDelete/ChipDelete.test.tsx
index ba9328c78b8d51..b6ff05e0483838 100644
--- a/packages/mui-joy/src/ChipDelete/ChipDelete.test.tsx
+++ b/packages/mui-joy/src/ChipDelete/ChipDelete.test.tsx
@@ -7,7 +7,7 @@ import {
describeJoyColorInversion,
act,
fireEvent,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import Chip from '@mui/joy/Chip';
import ChipDelete, { chipDeleteClasses as classes } from '@mui/joy/ChipDelete';
diff --git a/packages/mui-joy/src/CircularProgress/CircularProgress.test.tsx b/packages/mui-joy/src/CircularProgress/CircularProgress.test.tsx
index 6e4b421cbc37c4..8316f1454bb014 100644
--- a/packages/mui-joy/src/CircularProgress/CircularProgress.test.tsx
+++ b/packages/mui-joy/src/CircularProgress/CircularProgress.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, describeJoyColorInversion } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import CircularProgress, { circularProgressClasses as classes } from '@mui/joy/CircularProgress';
diff --git a/packages/mui-joy/src/Container/Container.test.tsx b/packages/mui-joy/src/Container/Container.test.tsx
index 4fd0d207ed2b46..9094c70a701358 100644
--- a/packages/mui-joy/src/Container/Container.test.tsx
+++ b/packages/mui-joy/src/Container/Container.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import Container, { containerClasses as classes } from '@mui/joy/Container';
diff --git a/packages/mui-joy/src/DialogActions/DialogActions.test.tsx b/packages/mui-joy/src/DialogActions/DialogActions.test.tsx
index 22185193135585..00cb6e9070239a 100644
--- a/packages/mui-joy/src/DialogActions/DialogActions.test.tsx
+++ b/packages/mui-joy/src/DialogActions/DialogActions.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import DialogActions, { dialogActionsClasses as classes } from '@mui/joy/DialogActions';
diff --git a/packages/mui-joy/src/DialogContent/DialogContent.test.tsx b/packages/mui-joy/src/DialogContent/DialogContent.test.tsx
index f764ffcbb98439..be5e64079572ef 100644
--- a/packages/mui-joy/src/DialogContent/DialogContent.test.tsx
+++ b/packages/mui-joy/src/DialogContent/DialogContent.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import DialogContent, { dialogContentClasses as classes } from '@mui/joy/DialogContent';
diff --git a/packages/mui-joy/src/DialogTitle/DialogTitle.test.tsx b/packages/mui-joy/src/DialogTitle/DialogTitle.test.tsx
index bcedfa180b8f33..f457f9260369da 100644
--- a/packages/mui-joy/src/DialogTitle/DialogTitle.test.tsx
+++ b/packages/mui-joy/src/DialogTitle/DialogTitle.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import CardContent, { cardContentClasses as classes } from '@mui/joy/CardContent';
diff --git a/packages/mui-joy/src/Divider/Divider.test.tsx b/packages/mui-joy/src/Divider/Divider.test.tsx
index aab564a1f3848a..efe1574a149619 100644
--- a/packages/mui-joy/src/Divider/Divider.test.tsx
+++ b/packages/mui-joy/src/Divider/Divider.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import Divider, { dividerClasses as classes } from '@mui/joy/Divider';
diff --git a/packages/mui-joy/src/Drawer/Drawer.test.tsx b/packages/mui-joy/src/Drawer/Drawer.test.tsx
index e57b781b144ec1..786dd8e6452248 100644
--- a/packages/mui-joy/src/Drawer/Drawer.test.tsx
+++ b/packages/mui-joy/src/Drawer/Drawer.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import Drawer, { drawerClasses as classes } from '@mui/joy/Drawer';
diff --git a/packages/mui-joy/src/FormControl/FormControl.test.tsx b/packages/mui-joy/src/FormControl/FormControl.test.tsx
index b3dc5d7d9a8cbb..1ef6de294d1b5a 100644
--- a/packages/mui-joy/src/FormControl/FormControl.test.tsx
+++ b/packages/mui-joy/src/FormControl/FormControl.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import FormControl, { formControlClasses as classes } from '@mui/joy/FormControl';
diff --git a/packages/mui-joy/src/FormHelperText/FormHelperText.test.tsx b/packages/mui-joy/src/FormHelperText/FormHelperText.test.tsx
index e82dd4d6108661..48b5c31cb221ba 100644
--- a/packages/mui-joy/src/FormHelperText/FormHelperText.test.tsx
+++ b/packages/mui-joy/src/FormHelperText/FormHelperText.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import FormHelperText, { formHelperTextClasses as classes } from '@mui/joy/FormHelperText';
diff --git a/packages/mui-joy/src/FormLabel/FormLabel.test.tsx b/packages/mui-joy/src/FormLabel/FormLabel.test.tsx
index a98c55e967c2c9..ec5cb89df1e1db 100644
--- a/packages/mui-joy/src/FormLabel/FormLabel.test.tsx
+++ b/packages/mui-joy/src/FormLabel/FormLabel.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import FormLabel, { formLabelClasses as classes } from '@mui/joy/FormLabel';
diff --git a/packages/mui-joy/src/Grid/Grid.test.tsx b/packages/mui-joy/src/Grid/Grid.test.tsx
index 577d6c75187ae1..06a9c77a84701e 100644
--- a/packages/mui-joy/src/Grid/Grid.test.tsx
+++ b/packages/mui-joy/src/Grid/Grid.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import Grid, { gridClasses as classes } from '@mui/joy/Grid';
diff --git a/packages/mui-joy/src/IconButton/IconButton.test.tsx b/packages/mui-joy/src/IconButton/IconButton.test.tsx
index 258fa9025a7977..358c1fb4e89a80 100644
--- a/packages/mui-joy/src/IconButton/IconButton.test.tsx
+++ b/packages/mui-joy/src/IconButton/IconButton.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, describeJoyColorInversion } from 'test/utils';
+import {
+ describeConformance,
+ createRenderer,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import IconButton, { iconButtonClasses as classes } from '@mui/joy/IconButton';
import { ThemeProvider } from '@mui/joy/styles';
diff --git a/packages/mui-joy/src/Input/Input.test.tsx b/packages/mui-joy/src/Input/Input.test.tsx
index 991362f9522b98..839ab09b864861 100644
--- a/packages/mui-joy/src/Input/Input.test.tsx
+++ b/packages/mui-joy/src/Input/Input.test.tsx
@@ -8,7 +8,7 @@ import {
screen,
act,
fireEvent,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import Input, { inputClasses as classes } from '@mui/joy/Input';
import { ThemeProvider } from '@mui/joy/styles';
diff --git a/packages/mui-joy/src/LinearProgress/LinearProgress.test.tsx b/packages/mui-joy/src/LinearProgress/LinearProgress.test.tsx
index ceb9ced2abb27a..1cdac10d1daab2 100644
--- a/packages/mui-joy/src/LinearProgress/LinearProgress.test.tsx
+++ b/packages/mui-joy/src/LinearProgress/LinearProgress.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, describeJoyColorInversion } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import LinearProgress, { linearProgressClasses as classes } from '@mui/joy/LinearProgress';
diff --git a/packages/mui-joy/src/Link/Link.test.tsx b/packages/mui-joy/src/Link/Link.test.tsx
index 33c188aa2fab95..f5ec486606602e 100644
--- a/packages/mui-joy/src/Link/Link.test.tsx
+++ b/packages/mui-joy/src/Link/Link.test.tsx
@@ -7,7 +7,7 @@ import {
fireEvent,
describeConformance,
describeJoyColorInversion,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import Link, { LinkClassKey, linkClasses as classes } from '@mui/joy/Link';
import Typography from '@mui/joy/Typography';
diff --git a/packages/mui-joy/src/List/List.test.tsx b/packages/mui-joy/src/List/List.test.tsx
index d1d4c908eecb0b..5959b877d3619f 100644
--- a/packages/mui-joy/src/List/List.test.tsx
+++ b/packages/mui-joy/src/List/List.test.tsx
@@ -1,6 +1,11 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, screen, describeJoyColorInversion } from 'test/utils';
+import {
+ describeConformance,
+ createRenderer,
+ screen,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import List, { listClasses as classes } from '@mui/joy/List';
import ListItem from '@mui/joy/ListItem';
diff --git a/packages/mui-joy/src/ListDivider/ListDivider.test.tsx b/packages/mui-joy/src/ListDivider/ListDivider.test.tsx
index fc7c2bde18cf6c..1a6515afaa5d73 100644
--- a/packages/mui-joy/src/ListDivider/ListDivider.test.tsx
+++ b/packages/mui-joy/src/ListDivider/ListDivider.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, screen } from 'test/utils';
+import { describeConformance, createRenderer, screen } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import List from '@mui/joy/List';
import ListDivider, { listDividerClasses as classes } from '@mui/joy/ListDivider';
diff --git a/packages/mui-joy/src/ListItem/ListItem.test.tsx b/packages/mui-joy/src/ListItem/ListItem.test.tsx
index bc10d7db269953..9275155bcfbd99 100644
--- a/packages/mui-joy/src/ListItem/ListItem.test.tsx
+++ b/packages/mui-joy/src/ListItem/ListItem.test.tsx
@@ -1,6 +1,11 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, screen, describeJoyColorInversion } from 'test/utils';
+import {
+ describeConformance,
+ createRenderer,
+ screen,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import MenuList from '@mui/joy/MenuList';
import List from '@mui/joy/List';
diff --git a/packages/mui-joy/src/ListItemButton/ListItemButton.test.tsx b/packages/mui-joy/src/ListItemButton/ListItemButton.test.tsx
index 5ab7c298db99fb..4d84724100881f 100644
--- a/packages/mui-joy/src/ListItemButton/ListItemButton.test.tsx
+++ b/packages/mui-joy/src/ListItemButton/ListItemButton.test.tsx
@@ -6,7 +6,7 @@ import {
createRenderer,
act,
fireEvent,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import ListItemButton, { listItemButtonClasses as classes } from '@mui/joy/ListItemButton';
diff --git a/packages/mui-joy/src/ListItemContent/ListItemContent.test.tsx b/packages/mui-joy/src/ListItemContent/ListItemContent.test.tsx
index 63b0ba0d99328e..5727a4fecda71b 100644
--- a/packages/mui-joy/src/ListItemContent/ListItemContent.test.tsx
+++ b/packages/mui-joy/src/ListItemContent/ListItemContent.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import ListItemContent, { listItemContentClasses as classes } from '@mui/joy/ListItemContent';
diff --git a/packages/mui-joy/src/ListItemDecorator/ListItemDecorator.test.tsx b/packages/mui-joy/src/ListItemDecorator/ListItemDecorator.test.tsx
index 79aed7bc933374..1b0bad3280aaa8 100644
--- a/packages/mui-joy/src/ListItemDecorator/ListItemDecorator.test.tsx
+++ b/packages/mui-joy/src/ListItemDecorator/ListItemDecorator.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import ListItemDecorator, { listItemDecoratorClasses as classes } from '@mui/joy/ListItemDecorator';
diff --git a/packages/mui-joy/src/ListSubheader/ListSubheader.test.tsx b/packages/mui-joy/src/ListSubheader/ListSubheader.test.tsx
index d09aadf428a89a..0e406e20ed9473 100644
--- a/packages/mui-joy/src/ListSubheader/ListSubheader.test.tsx
+++ b/packages/mui-joy/src/ListSubheader/ListSubheader.test.tsx
@@ -1,7 +1,11 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, createRenderer, describeJoyColorInversion } from 'test/utils';
+import {
+ describeConformance,
+ createRenderer,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import ListSubheader, { listSubheaderClasses as classes } from '@mui/joy/ListSubheader';
import ListSubheaderDispatch from './ListSubheaderContext';
diff --git a/packages/mui-joy/src/Menu/Menu.test.tsx b/packages/mui-joy/src/Menu/Menu.test.tsx
index 6a9abc45921766..143b191faab91e 100644
--- a/packages/mui-joy/src/Menu/Menu.test.tsx
+++ b/packages/mui-joy/src/Menu/Menu.test.tsx
@@ -8,7 +8,7 @@ import {
screen,
fireEvent,
describeJoyColorInversion,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { Popper as PopperUnstyled } from '@mui/base/Popper';
import { DropdownContext, DropdownContextValue } from '@mui/base/useDropdown';
import { ThemeProvider } from '@mui/joy/styles';
diff --git a/packages/mui-joy/src/MenuButton/MenuButton.test.tsx b/packages/mui-joy/src/MenuButton/MenuButton.test.tsx
index db611630242781..ba265e18575be2 100644
--- a/packages/mui-joy/src/MenuButton/MenuButton.test.tsx
+++ b/packages/mui-joy/src/MenuButton/MenuButton.test.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { DropdownContext, DropdownContextValue } from '@mui/base/useDropdown';
import { ThemeProvider } from '@mui/joy/styles';
import MenuButton, { menuButtonClasses as classes } from '@mui/joy/MenuButton';
diff --git a/packages/mui-joy/src/MenuItem/MenuItem.test.tsx b/packages/mui-joy/src/MenuItem/MenuItem.test.tsx
index 661ce4dadecf81..3bce808e700b04 100644
--- a/packages/mui-joy/src/MenuItem/MenuItem.test.tsx
+++ b/packages/mui-joy/src/MenuItem/MenuItem.test.tsx
@@ -8,7 +8,7 @@ import {
fireEvent,
screen,
describeJoyColorInversion,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { MenuProvider, MenuProviderValue } from '@mui/base/useMenu';
import { ThemeProvider } from '@mui/joy/styles';
import MenuItem, { menuItemClasses as classes } from '@mui/joy/MenuItem';
diff --git a/packages/mui-joy/src/MenuList/MenuList.test.tsx b/packages/mui-joy/src/MenuList/MenuList.test.tsx
index 8861d7d436f146..a95592b17bc4b3 100644
--- a/packages/mui-joy/src/MenuList/MenuList.test.tsx
+++ b/packages/mui-joy/src/MenuList/MenuList.test.tsx
@@ -1,6 +1,11 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, screen, describeJoyColorInversion } from 'test/utils';
+import {
+ describeConformance,
+ createRenderer,
+ screen,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import MenuList, { menuListClasses as classes } from '@mui/joy/MenuList';
diff --git a/packages/mui-joy/src/Modal/Modal.test.tsx b/packages/mui-joy/src/Modal/Modal.test.tsx
index 15415281cb7593..3d79c7b8cd6969 100644
--- a/packages/mui-joy/src/Modal/Modal.test.tsx
+++ b/packages/mui-joy/src/Modal/Modal.test.tsx
@@ -2,7 +2,13 @@ import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { spy } from 'sinon';
import { expect } from 'chai';
-import { createRenderer, describeConformance, act, fireEvent, within } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ act,
+ fireEvent,
+ within,
+} from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import Modal, { modalClasses as classes, ModalProps } from '@mui/joy/Modal';
diff --git a/packages/mui-joy/src/ModalClose/ModalClose.test.tsx b/packages/mui-joy/src/ModalClose/ModalClose.test.tsx
index 48f9a37da4c332..4bd68b15827b79 100644
--- a/packages/mui-joy/src/ModalClose/ModalClose.test.tsx
+++ b/packages/mui-joy/src/ModalClose/ModalClose.test.tsx
@@ -6,7 +6,7 @@ import {
describeConformance,
describeJoyColorInversion,
fireEvent,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import Modal from '@mui/joy/Modal';
diff --git a/packages/mui-joy/src/ModalDialog/ModalDialog.test.tsx b/packages/mui-joy/src/ModalDialog/ModalDialog.test.tsx
index 437c52036b6fc8..c07f4e3e5d84e2 100644
--- a/packages/mui-joy/src/ModalDialog/ModalDialog.test.tsx
+++ b/packages/mui-joy/src/ModalDialog/ModalDialog.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, describeJoyColorInversion } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import ModalDialog, { modalDialogClasses as classes } from '@mui/joy/ModalDialog';
diff --git a/packages/mui-joy/src/ModalOverflow/ModalOverflow.test.tsx b/packages/mui-joy/src/ModalOverflow/ModalOverflow.test.tsx
index 6b2268cc25fffb..4b33be3c56985f 100644
--- a/packages/mui-joy/src/ModalOverflow/ModalOverflow.test.tsx
+++ b/packages/mui-joy/src/ModalOverflow/ModalOverflow.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import ModalOverflow, { modalOverflowClasses as classes } from '@mui/joy/ModalOverflow';
diff --git a/packages/mui-joy/src/Radio/Radio.test.tsx b/packages/mui-joy/src/Radio/Radio.test.tsx
index a3460d781e2260..eaf3bf40235e82 100644
--- a/packages/mui-joy/src/Radio/Radio.test.tsx
+++ b/packages/mui-joy/src/Radio/Radio.test.tsx
@@ -6,7 +6,7 @@ import {
createRenderer,
fireEvent,
describeJoyColorInversion,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import Radio, { radioClasses as classes } from '@mui/joy/Radio';
import { ThemeProvider } from '@mui/joy/styles';
diff --git a/packages/mui-joy/src/RadioGroup/RadioGroup.test.tsx b/packages/mui-joy/src/RadioGroup/RadioGroup.test.tsx
index 90f2665ad56884..1c622252b9cff3 100644
--- a/packages/mui-joy/src/RadioGroup/RadioGroup.test.tsx
+++ b/packages/mui-joy/src/RadioGroup/RadioGroup.test.tsx
@@ -2,7 +2,13 @@ import * as React from 'react';
import PropTypes from 'prop-types';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils';
+import {
+ describeConformance,
+ act,
+ createRenderer,
+ fireEvent,
+ screen,
+} from '@mui-internal/test-utils';
import RadioGroup, { radioGroupClasses as classes, RadioGroupProps } from '@mui/joy/RadioGroup';
import Radio from '@mui/joy/Radio';
import { ThemeProvider } from '@mui/joy/styles';
diff --git a/packages/mui-joy/src/ScopedCssBaseline/ScopedCssBaseline.test.tsx b/packages/mui-joy/src/ScopedCssBaseline/ScopedCssBaseline.test.tsx
index 19802b8143d99f..064797f0a7a41d 100644
--- a/packages/mui-joy/src/ScopedCssBaseline/ScopedCssBaseline.test.tsx
+++ b/packages/mui-joy/src/ScopedCssBaseline/ScopedCssBaseline.test.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import ScopedCssBaseline, { scopedCssBaselineClasses as classes } from '@mui/joy/ScopedCssBaseline';
diff --git a/packages/mui-joy/src/Select/Select.test.tsx b/packages/mui-joy/src/Select/Select.test.tsx
index 5a777cde503109..239871e5a8e49f 100644
--- a/packages/mui-joy/src/Select/Select.test.tsx
+++ b/packages/mui-joy/src/Select/Select.test.tsx
@@ -8,7 +8,7 @@ import {
createRenderer,
fireEvent,
screen,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import Select, { selectClasses as classes, SelectOption } from '@mui/joy/Select';
import Option from '@mui/joy/Option';
diff --git a/packages/mui-joy/src/Sheet/Sheet.test.tsx b/packages/mui-joy/src/Sheet/Sheet.test.tsx
index 210529638d6d8c..6b9c58e3752461 100644
--- a/packages/mui-joy/src/Sheet/Sheet.test.tsx
+++ b/packages/mui-joy/src/Sheet/Sheet.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, describeJoyColorInversion } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import Sheet, { sheetClasses as classes, SheetClassKey } from '@mui/joy/Sheet';
diff --git a/packages/mui-joy/src/Skeleton/Skeleton.test.tsx b/packages/mui-joy/src/Skeleton/Skeleton.test.tsx
index 0c130cd18a70c9..854409169b2710 100644
--- a/packages/mui-joy/src/Skeleton/Skeleton.test.tsx
+++ b/packages/mui-joy/src/Skeleton/Skeleton.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import Skeleton, { skeletonClasses as classes } from '@mui/joy/Skeleton';
diff --git a/packages/mui-joy/src/Slider/Slider.test.tsx b/packages/mui-joy/src/Slider/Slider.test.tsx
index 40767eb0060e85..8e2a08410db6e6 100644
--- a/packages/mui-joy/src/Slider/Slider.test.tsx
+++ b/packages/mui-joy/src/Slider/Slider.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, describeJoyColorInversion } from 'test/utils';
+import {
+ describeConformance,
+ createRenderer,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import Slider, { sliderClasses as classes } from '@mui/joy/Slider';
import { ThemeProvider } from '@mui/joy/styles';
diff --git a/packages/mui-joy/src/Stack/Stack.test.tsx b/packages/mui-joy/src/Stack/Stack.test.tsx
index 44dd7ecead741c..bf4552bd2abe00 100644
--- a/packages/mui-joy/src/Stack/Stack.test.tsx
+++ b/packages/mui-joy/src/Stack/Stack.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import Stack, { stackClasses as classes } from '@mui/joy/Stack';
diff --git a/packages/mui-joy/src/SvgIcon/SvgIcon.test.tsx b/packages/mui-joy/src/SvgIcon/SvgIcon.test.tsx
index a24cf0f87cfe4c..47f169e59abf0f 100644
--- a/packages/mui-joy/src/SvgIcon/SvgIcon.test.tsx
+++ b/packages/mui-joy/src/SvgIcon/SvgIcon.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import SvgIcon, {
svgIconClasses as classes,
diff --git a/packages/mui-joy/src/Switch/Switch.test.tsx b/packages/mui-joy/src/Switch/Switch.test.tsx
index ea44532064c45a..014c0baf54c62c 100644
--- a/packages/mui-joy/src/Switch/Switch.test.tsx
+++ b/packages/mui-joy/src/Switch/Switch.test.tsx
@@ -7,7 +7,7 @@ import {
createRenderer,
fireEvent,
screen,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import Switch, { switchClasses as classes } from '@mui/joy/Switch';
import { ThemeProvider } from '@mui/joy/styles';
diff --git a/packages/mui-joy/src/Tab/Tab.test.tsx b/packages/mui-joy/src/Tab/Tab.test.tsx
index a7ddb7a211d651..538a9845f194f7 100644
--- a/packages/mui-joy/src/Tab/Tab.test.tsx
+++ b/packages/mui-joy/src/Tab/Tab.test.tsx
@@ -1,6 +1,11 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, screen, describeJoyColorInversion } from 'test/utils';
+import {
+ describeConformance,
+ createRenderer,
+ screen,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { TabsProps } from '@mui/base/Tabs';
import { useTabs, TabsProvider as BaseTabsProvider } from '@mui/base/useTabs';
import { useTabsList, TabsListProvider as BaseTabsListProvider } from '@mui/base/useTabsList';
diff --git a/packages/mui-joy/src/TabList/TabList.test.tsx b/packages/mui-joy/src/TabList/TabList.test.tsx
index e470696b27412c..5dbd76080dcacd 100644
--- a/packages/mui-joy/src/TabList/TabList.test.tsx
+++ b/packages/mui-joy/src/TabList/TabList.test.tsx
@@ -1,6 +1,11 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, screen, describeJoyColorInversion } from 'test/utils';
+import {
+ describeConformance,
+ createRenderer,
+ screen,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { TabsProps } from '@mui/base/Tabs';
import { useTabs, TabsProvider as BaseTabsProvider } from '@mui/base/useTabs';
import { ThemeProvider } from '@mui/joy/styles';
diff --git a/packages/mui-joy/src/TabPanel/TabPanel.test.tsx b/packages/mui-joy/src/TabPanel/TabPanel.test.tsx
index 5b92545f915479..cab2e72d8dd44b 100644
--- a/packages/mui-joy/src/TabPanel/TabPanel.test.tsx
+++ b/packages/mui-joy/src/TabPanel/TabPanel.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, screen } from 'test/utils';
+import { describeConformance, createRenderer, screen } from '@mui-internal/test-utils';
import { TabsProps } from '@mui/base/Tabs';
import { useTabs, TabsProvider as BaseTabsProvider } from '@mui/base/useTabs';
import { ThemeProvider } from '@mui/joy/styles';
diff --git a/packages/mui-joy/src/Table/Table.test.tsx b/packages/mui-joy/src/Table/Table.test.tsx
index 13c88b34a59962..843f73cf9bdf7b 100644
--- a/packages/mui-joy/src/Table/Table.test.tsx
+++ b/packages/mui-joy/src/Table/Table.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, describeJoyColorInversion } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider } from '@mui/joy/styles';
import Table, { tableClasses as classes } from '@mui/joy/Table';
diff --git a/packages/mui-joy/src/Tabs/Tabs.test.tsx b/packages/mui-joy/src/Tabs/Tabs.test.tsx
index 3d470173bfb424..56052e1b00d5bd 100644
--- a/packages/mui-joy/src/Tabs/Tabs.test.tsx
+++ b/packages/mui-joy/src/Tabs/Tabs.test.tsx
@@ -1,6 +1,11 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, screen, describeJoyColorInversion } from 'test/utils';
+import {
+ describeConformance,
+ createRenderer,
+ screen,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import Tabs, { tabsClasses as classes } from '@mui/joy/Tabs';
import SizeTabsContext from './SizeTabsContext';
diff --git a/packages/mui-joy/src/Textarea/Textarea.test.tsx b/packages/mui-joy/src/Textarea/Textarea.test.tsx
index dfe176c48421b9..9df58d9be64752 100644
--- a/packages/mui-joy/src/Textarea/Textarea.test.tsx
+++ b/packages/mui-joy/src/Textarea/Textarea.test.tsx
@@ -8,7 +8,7 @@ import {
screen,
act,
fireEvent,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import Textarea, { textareaClasses as classes } from '@mui/joy/Textarea';
import { ThemeProvider } from '@mui/joy/styles';
diff --git a/packages/mui-joy/src/ToggleButtonGroup/ToggleButtonGroup.test.tsx b/packages/mui-joy/src/ToggleButtonGroup/ToggleButtonGroup.test.tsx
index 40a27fe0703948..9ab59c31f052eb 100644
--- a/packages/mui-joy/src/ToggleButtonGroup/ToggleButtonGroup.test.tsx
+++ b/packages/mui-joy/src/ToggleButtonGroup/ToggleButtonGroup.test.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer, describeConformance, screen } from 'test/utils';
+import { createRenderer, describeConformance, screen } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/joy/styles';
import ToggleButtonGroup, { toggleButtonGroupClasses as classes } from '@mui/joy/ToggleButtonGroup';
import Button from '@mui/joy/Button';
diff --git a/packages/mui-joy/src/Tooltip/Tooltip.test.tsx b/packages/mui-joy/src/Tooltip/Tooltip.test.tsx
index fedcb3f3232120..92daed9f4dda4f 100644
--- a/packages/mui-joy/src/Tooltip/Tooltip.test.tsx
+++ b/packages/mui-joy/src/Tooltip/Tooltip.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, describeJoyColorInversion } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { PopperProps } from '@mui/base';
import { ThemeProvider } from '@mui/joy/styles';
diff --git a/packages/mui-joy/src/Typography/Typography.test.tsx b/packages/mui-joy/src/Typography/Typography.test.tsx
index a3432137248a05..b372586094dfe6 100644
--- a/packages/mui-joy/src/Typography/Typography.test.tsx
+++ b/packages/mui-joy/src/Typography/Typography.test.tsx
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, describeJoyColorInversion } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ describeJoyColorInversion,
+} from '@mui-internal/test-utils';
import Typography, { typographyClasses as classes, TypographyProps } from '@mui/joy/Typography';
import { ThemeProvider } from '@mui/joy/styles';
diff --git a/packages/mui-joy/src/styles/ColorInversion.test.js b/packages/mui-joy/src/styles/ColorInversion.test.js
index 6da281dde59606..7b1a4af927157b 100644
--- a/packages/mui-joy/src/styles/ColorInversion.test.js
+++ b/packages/mui-joy/src/styles/ColorInversion.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import sinon from 'sinon';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import useThemeProps from './useThemeProps';
import ThemeProvider from './ThemeProvider';
import ColorInversion, { useColorInversion } from './ColorInversion';
diff --git a/packages/mui-joy/src/styles/CssVarsProvider.test.tsx b/packages/mui-joy/src/styles/CssVarsProvider.test.tsx
index 038856181aa8fd..7d139fda1b3ec7 100644
--- a/packages/mui-joy/src/styles/CssVarsProvider.test.tsx
+++ b/packages/mui-joy/src/styles/CssVarsProvider.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, screen } from 'test/utils';
+import { createRenderer, screen } from '@mui-internal/test-utils';
import { CssVarsProvider, extendTheme, useTheme, shouldSkipGeneratingVar } from '@mui/joy/styles';
describe('[Joy] CssVarsProvider', () => {
diff --git a/packages/mui-joy/src/styles/ThemeProvider.test.tsx b/packages/mui-joy/src/styles/ThemeProvider.test.tsx
index ea4eabf0b0abdd..584192f0748373 100644
--- a/packages/mui-joy/src/styles/ThemeProvider.test.tsx
+++ b/packages/mui-joy/src/styles/ThemeProvider.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { ThemeProvider, useTheme } from '@mui/joy/styles';
import defaultTheme from './defaultTheme';
diff --git a/packages/mui-joy/src/styles/extendTheme.test.js b/packages/mui-joy/src/styles/extendTheme.test.js
index 93d26913c93f62..88a47614004503 100644
--- a/packages/mui-joy/src/styles/extendTheme.test.js
+++ b/packages/mui-joy/src/styles/extendTheme.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { extendTheme, useTheme, CssVarsProvider } from '@mui/joy/styles';
describe('extendTheme', () => {
diff --git a/packages/mui-joy/src/styles/styled.test.tsx b/packages/mui-joy/src/styles/styled.test.tsx
index 8ce677f6efd539..7a555ddaababef 100644
--- a/packages/mui-joy/src/styles/styled.test.tsx
+++ b/packages/mui-joy/src/styles/styled.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { CssVarsProvider, ThemeProvider, styled, extendTheme } from '@mui/joy/styles';
import defaultTheme from './defaultTheme';
diff --git a/packages/mui-joy/src/styles/variantColorInheritance.test.tsx b/packages/mui-joy/src/styles/variantColorInheritance.test.tsx
index e6271640e026a7..d6f967869565ee 100644
--- a/packages/mui-joy/src/styles/variantColorInheritance.test.tsx
+++ b/packages/mui-joy/src/styles/variantColorInheritance.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { VariantColorProvider, useVariantColor } from './variantColorInheritance';
describe('VariantColorProvider', () => {
diff --git a/packages/mui-joy/src/utils/useSlot.test.tsx b/packages/mui-joy/src/utils/useSlot.test.tsx
index 3bac136dc2ed64..0684216f95ac35 100644
--- a/packages/mui-joy/src/utils/useSlot.test.tsx
+++ b/packages/mui-joy/src/utils/useSlot.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { Popper } from '@mui/base/Popper';
import { ColorPaletteProp, styled, VariantProp } from '../styles';
import { CreateSlotsAndSlotProps, SlotProps } from './types';
diff --git a/packages/mui-joy/test/integration/TabsIntegration.test.tsx b/packages/mui-joy/test/integration/TabsIntegration.test.tsx
index b99a03e927a7a6..6a27f964e0cbb0 100644
--- a/packages/mui-joy/test/integration/TabsIntegration.test.tsx
+++ b/packages/mui-joy/test/integration/TabsIntegration.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import Tabs from '@mui/joy/Tabs';
import TabList from '@mui/joy/TabList';
import Tab from '@mui/joy/Tab';
diff --git a/packages/mui-lab/package.json b/packages/mui-lab/package.json
index b1e6cfc7f20366..2a5bc0b929513c 100644
--- a/packages/mui-lab/package.json
+++ b/packages/mui-lab/package.json
@@ -51,6 +51,7 @@
"prop-types": "^15.8.1"
},
"devDependencies": {
+ "@mui-internal/test-utils": "^1.0.0",
"@types/chai": "^4.3.6",
"@types/prop-types": "^15.7.5",
"@types/react": "^18.2.21",
@@ -59,8 +60,7 @@
"chai": "^4.3.8",
"react": "^18.2.0",
"react-dom": "^18.2.0",
- "sinon": "^15.2.0",
- "test": "^5.0.0"
+ "sinon": "^15.2.0"
},
"peerDependencies": {
"@emotion/react": "^11.5.0",
diff --git a/packages/mui-lab/src/LoadingButton/LoadingButton.test.js b/packages/mui-lab/src/LoadingButton/LoadingButton.test.js
index 6de4f929436a77..ceea7217e298c8 100644
--- a/packages/mui-lab/src/LoadingButton/LoadingButton.test.js
+++ b/packages/mui-lab/src/LoadingButton/LoadingButton.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance, screen, within } from 'test/utils';
+import { createRenderer, describeConformance, screen, within } from '@mui-internal/test-utils';
import { expect } from 'chai';
import Button from '@mui/material/Button';
import LoadingButton, { loadingButtonClasses as classes } from '@mui/lab/LoadingButton';
diff --git a/packages/mui-lab/src/Masonry/Masonry.test.js b/packages/mui-lab/src/Masonry/Masonry.test.js
index f09a0c69b0ae27..7320e3aaaf49df 100644
--- a/packages/mui-lab/src/Masonry/Masonry.test.js
+++ b/packages/mui-lab/src/Masonry/Masonry.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { expect } from 'chai';
import { createTheme } from '@mui/material/styles';
import defaultTheme from '@mui/material/styles/defaultTheme';
diff --git a/packages/mui-lab/src/TabContext/TabContext.test.js b/packages/mui-lab/src/TabContext/TabContext.test.js
index 802c39e44b1f32..657bae9e853620 100644
--- a/packages/mui-lab/src/TabContext/TabContext.test.js
+++ b/packages/mui-lab/src/TabContext/TabContext.test.js
@@ -2,7 +2,7 @@
import * as React from 'react';
import * as ReactDOMServer from 'react-dom/server';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import TabContext, { getPanelId, getTabId, useTabContext } from './TabContext';
describe('', () => {
diff --git a/packages/mui-lab/src/TabList/TabList.test.js b/packages/mui-lab/src/TabList/TabList.test.js
index 8a99d65603c5b1..6419a4cb31c9f6 100644
--- a/packages/mui-lab/src/TabList/TabList.test.js
+++ b/packages/mui-lab/src/TabList/TabList.test.js
@@ -1,7 +1,7 @@
// @ts-check
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Tab from '@mui/material/Tab';
import Tabs, { tabsClasses as classes } from '@mui/material/Tabs';
import TabList from './TabList';
diff --git a/packages/mui-lab/src/TabPanel/TabPanel.test.tsx b/packages/mui-lab/src/TabPanel/TabPanel.test.tsx
index 47908a1d1cd14b..00db045f2b2a60 100644
--- a/packages/mui-lab/src/TabPanel/TabPanel.test.tsx
+++ b/packages/mui-lab/src/TabPanel/TabPanel.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import TabPanel, { tabPanelClasses as classes } from '@mui/lab/TabPanel';
import TabContext from '../TabContext';
diff --git a/packages/mui-lab/src/Timeline/Timeline.test.tsx b/packages/mui-lab/src/Timeline/Timeline.test.tsx
index 1c0aab5da7d025..bdec9ccdfdd988 100644
--- a/packages/mui-lab/src/Timeline/Timeline.test.tsx
+++ b/packages/mui-lab/src/Timeline/Timeline.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, screen } from 'test/utils';
+import { createRenderer, describeConformance, screen } from '@mui-internal/test-utils';
import Timeline, { timelineClasses as classes } from '@mui/lab/Timeline';
describe('', () => {
diff --git a/packages/mui-lab/src/TimelineConnector/TimelineConnector.test.js b/packages/mui-lab/src/TimelineConnector/TimelineConnector.test.js
index d6e9bf06b43172..48bb30ebca0a27 100644
--- a/packages/mui-lab/src/TimelineConnector/TimelineConnector.test.js
+++ b/packages/mui-lab/src/TimelineConnector/TimelineConnector.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import TimelineConnector, { timelineConnectorClasses as classes } from '@mui/lab/TimelineConnector';
describe('', () => {
diff --git a/packages/mui-lab/src/TimelineContent/TimelineContent.test.js b/packages/mui-lab/src/TimelineContent/TimelineContent.test.js
index 7af431ccf15dcf..bae2b2dd90e6c4 100644
--- a/packages/mui-lab/src/TimelineContent/TimelineContent.test.js
+++ b/packages/mui-lab/src/TimelineContent/TimelineContent.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Typography from '@mui/material/Typography';
import Timeline from '@mui/lab/Timeline';
import TimelineItem from '@mui/lab/TimelineItem';
diff --git a/packages/mui-lab/src/TimelineDot/TimelineDot.test.js b/packages/mui-lab/src/TimelineDot/TimelineDot.test.js
index 2e301df522812e..8a6619363b972a 100644
--- a/packages/mui-lab/src/TimelineDot/TimelineDot.test.js
+++ b/packages/mui-lab/src/TimelineDot/TimelineDot.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import TimelineDot, { timelineDotClasses as classes } from '@mui/lab/TimelineDot';
describe('', () => {
diff --git a/packages/mui-lab/src/TimelineItem/TimelineItem.test.js b/packages/mui-lab/src/TimelineItem/TimelineItem.test.js
index 961d96a7e285a0..532af2a2fac603 100644
--- a/packages/mui-lab/src/TimelineItem/TimelineItem.test.js
+++ b/packages/mui-lab/src/TimelineItem/TimelineItem.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import TimelineItem, { timelineItemClasses as classes } from '@mui/lab/TimelineItem';
describe('', () => {
diff --git a/packages/mui-lab/src/TimelineOppositeContent/TimelineOppositeContent.test.js b/packages/mui-lab/src/TimelineOppositeContent/TimelineOppositeContent.test.js
index d32183fdd18e0e..0b3087893f291e 100644
--- a/packages/mui-lab/src/TimelineOppositeContent/TimelineOppositeContent.test.js
+++ b/packages/mui-lab/src/TimelineOppositeContent/TimelineOppositeContent.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Typography from '@mui/material/Typography';
import Timeline from '@mui/lab/Timeline';
import TimelineItem from '@mui/lab/TimelineItem';
diff --git a/packages/mui-lab/src/TimelineSeparator/TimelineSeparator.test.js b/packages/mui-lab/src/TimelineSeparator/TimelineSeparator.test.js
index 22d69543ab8872..e2c9f61aa7d109 100644
--- a/packages/mui-lab/src/TimelineSeparator/TimelineSeparator.test.js
+++ b/packages/mui-lab/src/TimelineSeparator/TimelineSeparator.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import TimelineSeparator, { timelineSeparatorClasses as classes } from '@mui/lab/TimelineSeparator';
describe('', () => {
diff --git a/packages/mui-lab/test/integration/Tabs.test.js b/packages/mui-lab/test/integration/Tabs.test.js
index 14537af5e135c3..4106b9f10a8e22 100644
--- a/packages/mui-lab/test/integration/Tabs.test.js
+++ b/packages/mui-lab/test/integration/Tabs.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import Tab from '@mui/material/Tab';
import TabContext from '@mui/lab/TabContext';
import TabList from '@mui/lab/TabList';
diff --git a/packages/mui-material-next/package.json b/packages/mui-material-next/package.json
index 462ac7d3bf6399..d23ba729f2d107 100644
--- a/packages/mui-material-next/package.json
+++ b/packages/mui-material-next/package.json
@@ -52,6 +52,7 @@
"react-transition-group": "^4.4.5"
},
"devDependencies": {
+ "@mui-internal/test-utils": "^1.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/chai": "^4.3.6",
"@types/prop-types": "^15.7.5",
@@ -63,8 +64,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.15.0",
- "sinon": "^15.2.0",
- "test": "^5.0.0"
+ "sinon": "^15.2.0"
},
"peerDependencies": {
"@emotion/react": "^11.5.0",
diff --git a/packages/mui-material-next/src/Badge/Badge.test.tsx b/packages/mui-material-next/src/Badge/Badge.test.tsx
index 0af87fc8dc9463..22d881a4e1a0a7 100644
--- a/packages/mui-material-next/src/Badge/Badge.test.tsx
+++ b/packages/mui-material-next/src/Badge/Badge.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Badge, { badgeClasses as classes } from '@mui/material-next/Badge';
import { CssVarsProvider, extendTheme } from '@mui/material-next/styles';
diff --git a/packages/mui-material-next/src/Button/Button.test.js b/packages/mui-material-next/src/Button/Button.test.js
index 79e5a0017b72f4..7edd62846b1603 100644
--- a/packages/mui-material-next/src/Button/Button.test.js
+++ b/packages/mui-material-next/src/Button/Button.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, createRenderer, fireEvent, act } from 'test/utils';
+import { describeConformance, createRenderer, fireEvent, act } from '@mui-internal/test-utils';
import { camelCase } from 'lodash';
import Button, { buttonClasses as classes } from '@mui/material-next/Button';
import { CssVarsProvider, extendTheme } from '@mui/material-next/styles';
diff --git a/packages/mui-material-next/src/ButtonBase/ButtonBase.test.tsx b/packages/mui-material-next/src/ButtonBase/ButtonBase.test.tsx
index ab5d5da6070aba..a5ae1e5528469c 100644
--- a/packages/mui-material-next/src/ButtonBase/ButtonBase.test.tsx
+++ b/packages/mui-material-next/src/ButtonBase/ButtonBase.test.tsx
@@ -12,7 +12,7 @@ import {
focusVisible,
simulatePointerDevice,
programmaticFocusTriggersFocusVisible,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import PropTypes from 'prop-types';
import { MuiCancellableEventHandler } from '@mui/base/utils/MuiCancellableEvent';
import { CssVarsProvider, extendTheme } from '@mui/material-next/styles';
diff --git a/packages/mui-material-next/src/ButtonBase/Ripple.test.js b/packages/mui-material-next/src/ButtonBase/Ripple.test.js
index 6993128652e400..fa583ab6a62244 100644
--- a/packages/mui-material-next/src/ButtonBase/Ripple.test.js
+++ b/packages/mui-material-next/src/ButtonBase/Ripple.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import Ripple from './Ripple';
import classes from './touchRippleClasses';
diff --git a/packages/mui-material-next/src/ButtonBase/TouchRipple.test.js b/packages/mui-material-next/src/ButtonBase/TouchRipple.test.js
index c2aedceff0a208..a056cea0f10d60 100644
--- a/packages/mui-material-next/src/ButtonBase/TouchRipple.test.js
+++ b/packages/mui-material-next/src/ButtonBase/TouchRipple.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, act, createRenderer } from 'test/utils';
+import { describeConformance, act, createRenderer } from '@mui-internal/test-utils';
import TouchRipple, { DELAY_RIPPLE } from './TouchRipple';
const cb = () => {};
diff --git a/packages/mui-material-next/src/Chip/Chip.test.js b/packages/mui-material-next/src/Chip/Chip.test.js
index 45f6cf1d9266a9..72362765fb4688 100644
--- a/packages/mui-material-next/src/Chip/Chip.test.js
+++ b/packages/mui-material-next/src/Chip/Chip.test.js
@@ -9,7 +9,7 @@ import {
focusVisible,
simulatePointerDevice,
programmaticFocusTriggersFocusVisible,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { hexToRgb } from '@mui/system';
import { createTheme } from '@mui/material/styles';
import Avatar from '@mui/material/Avatar';
diff --git a/packages/mui-material-next/src/FormControl/FormControl.test.js b/packages/mui-material-next/src/FormControl/FormControl.test.js
index 4ad1deed7f5295..0027766b0f3a8e 100644
--- a/packages/mui-material-next/src/FormControl/FormControl.test.js
+++ b/packages/mui-material-next/src/FormControl/FormControl.test.js
@@ -2,7 +2,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, act, createRenderer } from 'test/utils';
+import { describeConformance, act, createRenderer } from '@mui-internal/test-utils';
import FormControl, { formControlClasses as classes } from '@mui/material-next/FormControl';
// TODO: replace with material-next/OutlinedInput
import InputBase from '@mui/material-next/InputBase';
diff --git a/packages/mui-material-next/src/Input/Input.test.js b/packages/mui-material-next/src/Input/Input.test.js
index 57cc9e4a9097fb..1882b3e36d6024 100644
--- a/packages/mui-material-next/src/Input/Input.test.js
+++ b/packages/mui-material-next/src/Input/Input.test.js
@@ -2,7 +2,13 @@ import * as React from 'react';
import PropTypes from 'prop-types';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils';
+import {
+ describeConformance,
+ act,
+ createRenderer,
+ fireEvent,
+ screen,
+} from '@mui-internal/test-utils';
import Input, { inputClasses as classes } from '@mui/material-next/Input';
describe('', () => {
diff --git a/packages/mui-material-next/src/InputBase/InputBase.test.js b/packages/mui-material-next/src/InputBase/InputBase.test.js
index a45e864d9e5917..3774b529c76751 100644
--- a/packages/mui-material-next/src/InputBase/InputBase.test.js
+++ b/packages/mui-material-next/src/InputBase/InputBase.test.js
@@ -3,7 +3,13 @@ import * as React from 'react';
import PropTypes from 'prop-types';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils';
+import {
+ describeConformance,
+ act,
+ createRenderer,
+ fireEvent,
+ screen,
+} from '@mui-internal/test-utils';
import { ThemeProvider } from '@emotion/react';
import FormControl, { useFormControl } from '@mui/material/FormControl';
import InputAdornment from '@mui/material/InputAdornment';
diff --git a/packages/mui-material-next/src/Slider/Slider.test.js b/packages/mui-material-next/src/Slider/Slider.test.js
index 2dd6de50c8a409..da7dc8d96917b4 100644
--- a/packages/mui-material-next/src/Slider/Slider.test.js
+++ b/packages/mui-material-next/src/Slider/Slider.test.js
@@ -2,7 +2,13 @@ import * as React from 'react';
import PropTypes from 'prop-types';
import { spy, stub } from 'sinon';
import { expect } from 'chai';
-import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils';
+import {
+ describeConformance,
+ act,
+ createRenderer,
+ fireEvent,
+ screen,
+} from '@mui-internal/test-utils';
import { Slider as BaseSlider } from '@mui/base/Slider';
import { CssVarsProvider, extendTheme } from '@mui/material-next/styles';
import Slider, { sliderClasses as classes } from '@mui/material-next/Slider';
diff --git a/packages/mui-material-next/src/Tab/Tab.test.js b/packages/mui-material-next/src/Tab/Tab.test.js
index 9aada780240f64..ac5fdb6e89c8e9 100644
--- a/packages/mui-material-next/src/Tab/Tab.test.js
+++ b/packages/mui-material-next/src/Tab/Tab.test.js
@@ -3,7 +3,7 @@ import Tab, { tabClasses as classes } from '@mui/material/Tab';
import { expect } from 'chai';
import * as React from 'react';
import { spy } from 'sinon';
-import { act, createRenderer, describeConformance, fireEvent } from 'test/utils';
+import { act, createRenderer, describeConformance, fireEvent } from '@mui-internal/test-utils';
describe('', () => {
const { render } = createRenderer();
diff --git a/packages/mui-material-next/src/TabScrollButton/TabScrollButton.test.js b/packages/mui-material-next/src/TabScrollButton/TabScrollButton.test.js
index 4b4834d442141e..ee5440fc203fd8 100644
--- a/packages/mui-material-next/src/TabScrollButton/TabScrollButton.test.js
+++ b/packages/mui-material-next/src/TabScrollButton/TabScrollButton.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import TabScrollButton, {
tabScrollButtonClasses as classes,
} from '@mui/material-next/TabScrollButton';
diff --git a/packages/mui-material-next/src/TablePagination/TablePagination.test.js b/packages/mui-material-next/src/TablePagination/TablePagination.test.js
index e3052bb9bbe3ab..aaf143d62a87b5 100644
--- a/packages/mui-material-next/src/TablePagination/TablePagination.test.js
+++ b/packages/mui-material-next/src/TablePagination/TablePagination.test.js
@@ -2,7 +2,7 @@ import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
import PropTypes from 'prop-types';
-import { describeConformance, fireEvent, createRenderer } from 'test/utils';
+import { describeConformance, fireEvent, createRenderer } from '@mui-internal/test-utils';
import TableFooter from '@mui/material/TableFooter';
import TableCell from '@mui/material/TableCell';
import TableRow from '@mui/material/TableRow';
diff --git a/packages/mui-material-next/src/Tabs/ScrollbarSize.test.js b/packages/mui-material-next/src/Tabs/ScrollbarSize.test.js
index 261a636223a50b..eb6e6899303525 100644
--- a/packages/mui-material-next/src/Tabs/ScrollbarSize.test.js
+++ b/packages/mui-material-next/src/Tabs/ScrollbarSize.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy, stub } from 'sinon';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import ScrollbarSize from './ScrollbarSize';
describe('', () => {
diff --git a/packages/mui-material-next/src/Tabs/Tabs.test.js b/packages/mui-material-next/src/Tabs/Tabs.test.js
index cc68b2830a8fe8..085af0c5d1e9af 100644
--- a/packages/mui-material-next/src/Tabs/Tabs.test.js
+++ b/packages/mui-material-next/src/Tabs/Tabs.test.js
@@ -8,7 +8,7 @@ import {
fireEvent,
screen,
strictModeDoubleLoggingSuppressed,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import { unstable_capitalize as capitalize } from '@mui/utils';
import Tab from '@mui/material-next/Tab';
diff --git a/packages/mui-material-next/src/styles/styled.test.js b/packages/mui-material-next/src/styles/styled.test.js
index 28d4a0ef06dae6..720850622207fe 100644
--- a/packages/mui-material-next/src/styles/styled.test.js
+++ b/packages/mui-material-next/src/styles/styled.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, screen } from 'test/utils';
+import { createRenderer, screen } from '@mui-internal/test-utils';
import { styled } from '@mui/material-next/styles';
describe('styled', () => {
diff --git a/packages/mui-material/package.json b/packages/mui-material/package.json
index 47b0ff68ea034e..381860fc3a8aed 100644
--- a/packages/mui-material/package.json
+++ b/packages/mui-material/package.json
@@ -59,6 +59,7 @@
"@mui/icons-material": "^5.14.9",
"@mui/lab": "^5.0.0-alpha.145",
"@mui/styles": "^5.14.10",
+ "@mui-internal/test-utils": "^1.0.0",
"@popperjs/core": "^2.11.8",
"@rollup/plugin-replace": "^5.0.2",
"@testing-library/dom": "^9.3.1",
@@ -84,8 +85,7 @@
"rollup-plugin-node-globals": "^1.4.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^7.0.2",
- "sinon": "^15.2.0",
- "test": "^5.0.0"
+ "sinon": "^15.2.0"
},
"peerDependencies": {
"@emotion/react": "^11.5.0",
diff --git a/packages/mui-material/src/Accordion/Accordion.test.js b/packages/mui-material/src/Accordion/Accordion.test.js
index ac7b9507bedd24..60d596a0abf0e2 100644
--- a/packages/mui-material/src/Accordion/Accordion.test.js
+++ b/packages/mui-material/src/Accordion/Accordion.test.js
@@ -2,7 +2,7 @@ import * as React from 'react';
import PropTypes from 'prop-types';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, createRenderer, fireEvent } from 'test/utils';
+import { describeConformance, createRenderer, fireEvent } from '@mui-internal/test-utils';
import Accordion, { accordionClasses as classes } from '@mui/material/Accordion';
import Paper from '@mui/material/Paper';
import AccordionSummary from '@mui/material/AccordionSummary';
diff --git a/packages/mui-material/src/AccordionActions/AccordionActions.test.js b/packages/mui-material/src/AccordionActions/AccordionActions.test.js
index 03ab384751d557..82f6abbc674d5d 100644
--- a/packages/mui-material/src/AccordionActions/AccordionActions.test.js
+++ b/packages/mui-material/src/AccordionActions/AccordionActions.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import AccordionActions, {
accordionActionsClasses as classes,
} from '@mui/material/AccordionActions';
diff --git a/packages/mui-material/src/AccordionDetails/AccordionDetails.test.js b/packages/mui-material/src/AccordionDetails/AccordionDetails.test.js
index 08d38664921cbd..ced854a3fbbbcb 100644
--- a/packages/mui-material/src/AccordionDetails/AccordionDetails.test.js
+++ b/packages/mui-material/src/AccordionDetails/AccordionDetails.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import AccordionDetails, {
accordionDetailsClasses as classes,
} from '@mui/material/AccordionDetails';
diff --git a/packages/mui-material/src/AccordionSummary/AccordionSummary.test.js b/packages/mui-material/src/AccordionSummary/AccordionSummary.test.js
index 10f24117c82498..8db043bb46dada 100644
--- a/packages/mui-material/src/AccordionSummary/AccordionSummary.test.js
+++ b/packages/mui-material/src/AccordionSummary/AccordionSummary.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, act, createRenderer, fireEvent } from 'test/utils';
+import { describeConformance, act, createRenderer, fireEvent } from '@mui-internal/test-utils';
import AccordionSummary, {
accordionSummaryClasses as classes,
} from '@mui/material/AccordionSummary';
diff --git a/packages/mui-material/src/Alert/Alert.test.js b/packages/mui-material/src/Alert/Alert.test.js
index 430d6880d42a0d..8914928c7ff6b4 100644
--- a/packages/mui-material/src/Alert/Alert.test.js
+++ b/packages/mui-material/src/Alert/Alert.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, screen } from 'test/utils';
+import { createRenderer, describeConformance, screen } from '@mui-internal/test-utils';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import Alert, { alertClasses as classes } from '@mui/material/Alert';
import Paper, { paperClasses } from '@mui/material/Paper';
diff --git a/packages/mui-material/src/AlertTitle/AlertTitle.test.js b/packages/mui-material/src/AlertTitle/AlertTitle.test.js
index 642af29b0ee89e..986029a69be08e 100644
--- a/packages/mui-material/src/AlertTitle/AlertTitle.test.js
+++ b/packages/mui-material/src/AlertTitle/AlertTitle.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import AlertTitle, { alertTitleClasses as classes } from '@mui/material/AlertTitle';
import Typography from '@mui/material/Typography';
diff --git a/packages/mui-material/src/AppBar/AppBar.test.js b/packages/mui-material/src/AppBar/AppBar.test.js
index 066f137f40c5c3..33f2c038013a45 100644
--- a/packages/mui-material/src/AppBar/AppBar.test.js
+++ b/packages/mui-material/src/AppBar/AppBar.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, screen } from 'test/utils';
+import { createRenderer, describeConformance, screen } from '@mui-internal/test-utils';
import AppBar, { appBarClasses as classes } from '@mui/material/AppBar';
import Paper from '@mui/material/Paper';
diff --git a/packages/mui-material/src/Autocomplete/Autocomplete.test.js b/packages/mui-material/src/Autocomplete/Autocomplete.test.js
index c8705e8f340829..c2a42e332e7cf3 100644
--- a/packages/mui-material/src/Autocomplete/Autocomplete.test.js
+++ b/packages/mui-material/src/Autocomplete/Autocomplete.test.js
@@ -8,7 +8,7 @@ import {
fireEvent,
screen,
strictModeDoubleLoggingSuppressed,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { spy } from 'sinon';
import userEvent from '@testing-library/user-event';
import Box from '@mui/system/Box';
diff --git a/packages/mui-material/src/Avatar/Avatar.test.js b/packages/mui-material/src/Avatar/Avatar.test.js
index 0d5ef55142e152..3ece7858bb378c 100644
--- a/packages/mui-material/src/Avatar/Avatar.test.js
+++ b/packages/mui-material/src/Avatar/Avatar.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, fireEvent, describeConformance } from 'test/utils';
+import { createRenderer, fireEvent, describeConformance } from '@mui-internal/test-utils';
import { spy } from 'sinon';
import Avatar, { avatarClasses as classes } from '@mui/material/Avatar';
import { createTheme, ThemeProvider } from '@mui/material/styles';
diff --git a/packages/mui-material/src/AvatarGroup/AvatarGroup.test.js b/packages/mui-material/src/AvatarGroup/AvatarGroup.test.js
index 632a2b182c3418..26764b881281b3 100644
--- a/packages/mui-material/src/AvatarGroup/AvatarGroup.test.js
+++ b/packages/mui-material/src/AvatarGroup/AvatarGroup.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import Avatar from '@mui/material/Avatar';
import AvatarGroup, { avatarGroupClasses as classes } from '@mui/material/AvatarGroup';
diff --git a/packages/mui-material/src/Backdrop/Backdrop.test.js b/packages/mui-material/src/Backdrop/Backdrop.test.js
index 6433b5712a7235..13a8f92f3f01d8 100644
--- a/packages/mui-material/src/Backdrop/Backdrop.test.js
+++ b/packages/mui-material/src/Backdrop/Backdrop.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Backdrop, { backdropClasses as classes } from '@mui/material/Backdrop';
import Fade from '@mui/material/Fade';
diff --git a/packages/mui-material/src/Badge/Badge.test.js b/packages/mui-material/src/Badge/Badge.test.js
index 2206c1a8661a38..b76c788a843bf4 100644
--- a/packages/mui-material/src/Badge/Badge.test.js
+++ b/packages/mui-material/src/Badge/Badge.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Badge, { badgeClasses as classes } from '@mui/material/Badge';
function findBadgeRoot(container) {
diff --git a/packages/mui-material/src/BottomNavigation/BottomNavigation.test.js b/packages/mui-material/src/BottomNavigation/BottomNavigation.test.js
index b92cd86fab4cde..66fa1028947f76 100755
--- a/packages/mui-material/src/BottomNavigation/BottomNavigation.test.js
+++ b/packages/mui-material/src/BottomNavigation/BottomNavigation.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, createRenderer, fireEvent } from 'test/utils';
+import { describeConformance, createRenderer, fireEvent } from '@mui-internal/test-utils';
import BottomNavigation, {
bottomNavigationClasses as classes,
} from '@mui/material/BottomNavigation';
diff --git a/packages/mui-material/src/BottomNavigationAction/BottomNavigationAction.test.js b/packages/mui-material/src/BottomNavigationAction/BottomNavigationAction.test.js
index 70ecd2b506c3e6..57604a6232b138 100644
--- a/packages/mui-material/src/BottomNavigationAction/BottomNavigationAction.test.js
+++ b/packages/mui-material/src/BottomNavigationAction/BottomNavigationAction.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, createRenderer, within } from 'test/utils';
+import { describeConformance, createRenderer, within } from '@mui-internal/test-utils';
import BottomNavigationAction, {
bottomNavigationActionClasses as classes,
} from '@mui/material/BottomNavigationAction';
diff --git a/packages/mui-material/src/Box/Box.test.js b/packages/mui-material/src/Box/Box.test.js
index aef94b0454fef9..b25089a467b311 100644
--- a/packages/mui-material/src/Box/Box.test.js
+++ b/packages/mui-material/src/Box/Box.test.js
@@ -1,7 +1,7 @@
/* eslint-disable material-ui/no-empty-box */
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import Box from '@mui/material/Box';
import { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/className';
diff --git a/packages/mui-material/src/Breadcrumbs/BreadcrumbCollapsed.test.js b/packages/mui-material/src/Breadcrumbs/BreadcrumbCollapsed.test.js
index 141b323a513aa5..a5d1542fe008b2 100644
--- a/packages/mui-material/src/Breadcrumbs/BreadcrumbCollapsed.test.js
+++ b/packages/mui-material/src/Breadcrumbs/BreadcrumbCollapsed.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { fireEvent, createRenderer } from 'test/utils';
+import { fireEvent, createRenderer } from '@mui-internal/test-utils';
import BreadcrumbCollapsed from './BreadcrumbCollapsed';
describe('', () => {
diff --git a/packages/mui-material/src/Breadcrumbs/Breadcrumbs.test.js b/packages/mui-material/src/Breadcrumbs/Breadcrumbs.test.js
index 912c95172ec178..468fbf4a608224 100644
--- a/packages/mui-material/src/Breadcrumbs/Breadcrumbs.test.js
+++ b/packages/mui-material/src/Breadcrumbs/Breadcrumbs.test.js
@@ -6,7 +6,7 @@ import {
createRenderer,
screen,
strictModeDoubleLoggingSuppressed,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import Breadcrumbs, { breadcrumbsClasses as classes } from '@mui/material/Breadcrumbs';
import Typography from '@mui/material/Typography';
import FirstPageIcon from '../internal/svg-icons/FirstPage';
diff --git a/packages/mui-material/src/Button/Button.test.js b/packages/mui-material/src/Button/Button.test.js
index a531e303a12243..76381c29cec6f8 100644
--- a/packages/mui-material/src/Button/Button.test.js
+++ b/packages/mui-material/src/Button/Button.test.js
@@ -1,6 +1,12 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils';
+import {
+ describeConformance,
+ act,
+ createRenderer,
+ fireEvent,
+ screen,
+} from '@mui-internal/test-utils';
import { ClassNames } from '@emotion/react';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import Button, { buttonClasses as classes } from '@mui/material/Button';
diff --git a/packages/mui-material/src/ButtonBase/ButtonBase.test.js b/packages/mui-material/src/ButtonBase/ButtonBase.test.js
index 079846a3ea0d78..27d5b00c226cd1 100644
--- a/packages/mui-material/src/ButtonBase/ButtonBase.test.js
+++ b/packages/mui-material/src/ButtonBase/ButtonBase.test.js
@@ -11,7 +11,7 @@ import {
focusVisible,
simulatePointerDevice,
programmaticFocusTriggersFocusVisible,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import PropTypes from 'prop-types';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import ButtonBase, { buttonBaseClasses as classes } from '@mui/material/ButtonBase';
diff --git a/packages/mui-material/src/ButtonBase/Ripple.test.js b/packages/mui-material/src/ButtonBase/Ripple.test.js
index 4c445dc4f6c065..23e325362196b9 100644
--- a/packages/mui-material/src/ButtonBase/Ripple.test.js
+++ b/packages/mui-material/src/ButtonBase/Ripple.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import Ripple from './Ripple';
import classes from './touchRippleClasses';
diff --git a/packages/mui-material/src/ButtonBase/TouchRipple.test.js b/packages/mui-material/src/ButtonBase/TouchRipple.test.js
index 5342e235152473..3c32076db30668 100644
--- a/packages/mui-material/src/ButtonBase/TouchRipple.test.js
+++ b/packages/mui-material/src/ButtonBase/TouchRipple.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, act, createRenderer } from 'test/utils';
+import { describeConformance, act, createRenderer } from '@mui-internal/test-utils';
import TouchRipple, { DELAY_RIPPLE } from './TouchRipple';
const cb = () => {};
diff --git a/packages/mui-material/src/ButtonGroup/ButtonGroup.test.js b/packages/mui-material/src/ButtonGroup/ButtonGroup.test.js
index e79439f7b13cba..809ad92a059cd4 100644
--- a/packages/mui-material/src/ButtonGroup/ButtonGroup.test.js
+++ b/packages/mui-material/src/ButtonGroup/ButtonGroup.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, screen } from 'test/utils';
+import { createRenderer, describeConformance, screen } from '@mui-internal/test-utils';
import ButtonGroup, { buttonGroupClasses as classes } from '@mui/material/ButtonGroup';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import Button, { buttonClasses } from '@mui/material/Button';
diff --git a/packages/mui-material/src/Card/Card.test.tsx b/packages/mui-material/src/Card/Card.test.tsx
index 11d7bb2a21c93a..d6ee9fdcd3bea1 100644
--- a/packages/mui-material/src/Card/Card.test.tsx
+++ b/packages/mui-material/src/Card/Card.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Card, { cardClasses as classes } from '@mui/material/Card';
import Paper from '@mui/material/Paper';
diff --git a/packages/mui-material/src/CardActionArea/CardActionArea.test.js b/packages/mui-material/src/CardActionArea/CardActionArea.test.js
index d3d9db7d1ce49c..1d878f74a37e9b 100644
--- a/packages/mui-material/src/CardActionArea/CardActionArea.test.js
+++ b/packages/mui-material/src/CardActionArea/CardActionArea.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import CardActionArea, { cardActionAreaClasses as classes } from '@mui/material/CardActionArea';
import ButtonBase from '@mui/material/ButtonBase';
diff --git a/packages/mui-material/src/CardActions/CardActions.test.js b/packages/mui-material/src/CardActions/CardActions.test.js
index 821827d7a516ff..734aa0c294be0a 100644
--- a/packages/mui-material/src/CardActions/CardActions.test.js
+++ b/packages/mui-material/src/CardActions/CardActions.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import CardActions, { cardActionsClasses as classes } from '@mui/material/CardActions';
describe('', () => {
diff --git a/packages/mui-material/src/CardContent/CardContent.test.js b/packages/mui-material/src/CardContent/CardContent.test.js
index d7c92860c2f9f4..2ac705d5f40c49 100644
--- a/packages/mui-material/src/CardContent/CardContent.test.js
+++ b/packages/mui-material/src/CardContent/CardContent.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import CardContent, { cardContentClasses as classes } from '@mui/material/CardContent';
describe('', () => {
diff --git a/packages/mui-material/src/CardHeader/CardHeader.test.js b/packages/mui-material/src/CardHeader/CardHeader.test.js
index 59de5b89f0e2fe..e78678b846cf81 100644
--- a/packages/mui-material/src/CardHeader/CardHeader.test.js
+++ b/packages/mui-material/src/CardHeader/CardHeader.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { typographyClasses } from '@mui/material/Typography';
import CardHeader, { cardHeaderClasses as classes } from '@mui/material/CardHeader';
diff --git a/packages/mui-material/src/CardMedia/CardMedia.test.js b/packages/mui-material/src/CardMedia/CardMedia.test.js
index 294346fe273fc7..b538f30603ac37 100644
--- a/packages/mui-material/src/CardMedia/CardMedia.test.js
+++ b/packages/mui-material/src/CardMedia/CardMedia.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import { expect } from 'chai';
-import { createRenderer, describeConformance, screen } from 'test/utils';
+import { createRenderer, describeConformance, screen } from '@mui-internal/test-utils';
import CardMedia, { cardMediaClasses as classes } from '@mui/material/CardMedia';
describe('', () => {
diff --git a/packages/mui-material/src/Checkbox/Checkbox.test.js b/packages/mui-material/src/Checkbox/Checkbox.test.js
index 9d7f03b8b267cc..900c02f5879e62 100644
--- a/packages/mui-material/src/Checkbox/Checkbox.test.js
+++ b/packages/mui-material/src/Checkbox/Checkbox.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, act, createRenderer } from 'test/utils';
+import { describeConformance, act, createRenderer } from '@mui-internal/test-utils';
import Checkbox, { checkboxClasses as classes } from '@mui/material/Checkbox';
import FormControl from '@mui/material/FormControl';
import ButtonBase from '@mui/material/ButtonBase';
diff --git a/packages/mui-material/src/Chip/Chip.test.js b/packages/mui-material/src/Chip/Chip.test.js
index dd5c45175c6f48..9c46654465cb14 100644
--- a/packages/mui-material/src/Chip/Chip.test.js
+++ b/packages/mui-material/src/Chip/Chip.test.js
@@ -9,7 +9,7 @@ import {
focusVisible,
simulatePointerDevice,
programmaticFocusTriggersFocusVisible,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import Avatar from '@mui/material/Avatar';
import Chip, { chipClasses as classes } from '@mui/material/Chip';
import {
diff --git a/packages/mui-material/src/CircularProgress/CircularProgress.test.js b/packages/mui-material/src/CircularProgress/CircularProgress.test.js
index 9df1871fea0270..bc21d0569eb17e 100644
--- a/packages/mui-material/src/CircularProgress/CircularProgress.test.js
+++ b/packages/mui-material/src/CircularProgress/CircularProgress.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import CircularProgress, {
circularProgressClasses as classes,
} from '@mui/material/CircularProgress';
diff --git a/packages/mui-material/src/Collapse/Collapse.test.js b/packages/mui-material/src/Collapse/Collapse.test.js
index afc48de4aebaf5..e5489956ea46f5 100644
--- a/packages/mui-material/src/Collapse/Collapse.test.js
+++ b/packages/mui-material/src/Collapse/Collapse.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy, stub } from 'sinon';
-import { act, createRenderer, describeConformance } from 'test/utils';
+import { act, createRenderer, describeConformance } from '@mui-internal/test-utils';
import { Transition } from 'react-transition-group';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import Collapse, { collapseClasses as classes } from '@mui/material/Collapse';
diff --git a/packages/mui-material/src/Container/Container.test.js b/packages/mui-material/src/Container/Container.test.js
index c0ed5d82ab34b1..1747d8ffb00248 100644
--- a/packages/mui-material/src/Container/Container.test.js
+++ b/packages/mui-material/src/Container/Container.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import Container, { containerClasses as classes } from '@mui/material/Container';
describe('', () => {
diff --git a/packages/mui-material/src/CssBaseline/CssBaseline.test.js b/packages/mui-material/src/CssBaseline/CssBaseline.test.js
index b6a443ac148bd0..af2be310779777 100644
--- a/packages/mui-material/src/CssBaseline/CssBaseline.test.js
+++ b/packages/mui-material/src/CssBaseline/CssBaseline.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import CssBaseline from '@mui/material/CssBaseline';
import { ThemeProvider, createTheme, hexToRgb } from '@mui/material/styles';
diff --git a/packages/mui-material/src/Dialog/Dialog.test.js b/packages/mui-material/src/Dialog/Dialog.test.js
index 6373cf216ab6be..0280c5810a0e2a 100644
--- a/packages/mui-material/src/Dialog/Dialog.test.js
+++ b/packages/mui-material/src/Dialog/Dialog.test.js
@@ -1,7 +1,13 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils';
+import {
+ describeConformance,
+ act,
+ createRenderer,
+ fireEvent,
+ screen,
+} from '@mui-internal/test-utils';
import Modal from '@mui/material/Modal';
import Dialog, { dialogClasses as classes } from '@mui/material/Dialog';
import { ThemeProvider, createTheme } from '@mui/material/styles';
@@ -19,14 +25,14 @@ function userClick(element) {
}
/**
- * @param {typeof import('test/utils').screen} view
+ * @param {typeof import('@mui-internal/test-utils').screen} view
*/
function findBackdrop(view) {
return view.getByRole('dialog').parentElement;
}
/**
- * @param {typeof import('test/utils').screen} view
+ * @param {typeof import('@mui-internal/test-utils').screen} view
*/
function clickBackdrop(view) {
userClick(findBackdrop(view));
diff --git a/packages/mui-material/src/DialogActions/DialogActions.test.js b/packages/mui-material/src/DialogActions/DialogActions.test.js
index e852dc8669a48a..e5c0426fd8a836 100644
--- a/packages/mui-material/src/DialogActions/DialogActions.test.js
+++ b/packages/mui-material/src/DialogActions/DialogActions.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import DialogActions, { dialogActionsClasses as classes } from '@mui/material/DialogActions';
describe('', () => {
diff --git a/packages/mui-material/src/DialogContent/DialogContent.test.js b/packages/mui-material/src/DialogContent/DialogContent.test.js
index 7c482c8f66772e..ba7041fbbd59f7 100644
--- a/packages/mui-material/src/DialogContent/DialogContent.test.js
+++ b/packages/mui-material/src/DialogContent/DialogContent.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import DialogContent, { dialogContentClasses as classes } from '@mui/material/DialogContent';
describe('', () => {
diff --git a/packages/mui-material/src/DialogContentText/DialogContentText.test.js b/packages/mui-material/src/DialogContentText/DialogContentText.test.js
index 19c1b639ee40c7..e83e70d20f9312 100644
--- a/packages/mui-material/src/DialogContentText/DialogContentText.test.js
+++ b/packages/mui-material/src/DialogContentText/DialogContentText.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Typography from '@mui/material/Typography';
import DialogContentText, {
dialogContentTextClasses as classes,
diff --git a/packages/mui-material/src/DialogTitle/DialogTitle.test.js b/packages/mui-material/src/DialogTitle/DialogTitle.test.js
index 25d50a50d3c306..9ba57ca45486da 100644
--- a/packages/mui-material/src/DialogTitle/DialogTitle.test.js
+++ b/packages/mui-material/src/DialogTitle/DialogTitle.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import Typography from '@mui/material/Typography';
import DialogTitle, { dialogTitleClasses as classes } from '@mui/material/DialogTitle';
import Dialog from '@mui/material/Dialog';
diff --git a/packages/mui-material/src/Divider/Divider.test.js b/packages/mui-material/src/Divider/Divider.test.js
index 91280cfa6e0419..cdba5d9675f424 100644
--- a/packages/mui-material/src/Divider/Divider.test.js
+++ b/packages/mui-material/src/Divider/Divider.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import Divider, { dividerClasses as classes } from '@mui/material/Divider';
describe('', () => {
diff --git a/packages/mui-material/src/Drawer/Drawer.test.js b/packages/mui-material/src/Drawer/Drawer.test.js
index c78c0f66e82c11..f410f654e621cd 100644
--- a/packages/mui-material/src/Drawer/Drawer.test.js
+++ b/packages/mui-material/src/Drawer/Drawer.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer, describeConformance, screen } from 'test/utils';
+import { createRenderer, describeConformance, screen } from '@mui-internal/test-utils';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import Drawer, { drawerClasses as classes } from '@mui/material/Drawer';
import { getAnchor, isHorizontal } from './Drawer';
diff --git a/packages/mui-material/src/Fab/Fab.test.js b/packages/mui-material/src/Fab/Fab.test.js
index 78b91555a67cd7..df56852e626573 100644
--- a/packages/mui-material/src/Fab/Fab.test.js
+++ b/packages/mui-material/src/Fab/Fab.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, act, fireEvent } from 'test/utils';
+import { describeConformance, createRenderer, act, fireEvent } from '@mui-internal/test-utils';
import Fab, { fabClasses as classes } from '@mui/material/Fab';
import ButtonBase, { touchRippleClasses } from '@mui/material/ButtonBase';
import Icon from '@mui/material/Icon';
diff --git a/packages/mui-material/src/Fade/Fade.test.js b/packages/mui-material/src/Fade/Fade.test.js
index 3b1621e5622c29..a4861623add6e1 100644
--- a/packages/mui-material/src/Fade/Fade.test.js
+++ b/packages/mui-material/src/Fade/Fade.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { Transition } from 'react-transition-group';
import Fade from '@mui/material/Fade';
import { ThemeProvider, createTheme } from '@mui/material/styles';
diff --git a/packages/mui-material/src/FilledInput/FilledInput.test.js b/packages/mui-material/src/FilledInput/FilledInput.test.js
index 12d05b68974504..e7ce5fde0068d7 100644
--- a/packages/mui-material/src/FilledInput/FilledInput.test.js
+++ b/packages/mui-material/src/FilledInput/FilledInput.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import FilledInput, { filledInputClasses as classes } from '@mui/material/FilledInput';
import InputBase from '@mui/material/InputBase';
diff --git a/packages/mui-material/src/FormControl/FormControl.test.js b/packages/mui-material/src/FormControl/FormControl.test.js
index 0cb5aa7d738929..1e905a6e098884 100644
--- a/packages/mui-material/src/FormControl/FormControl.test.js
+++ b/packages/mui-material/src/FormControl/FormControl.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, act, createRenderer } from 'test/utils';
+import { describeConformance, act, createRenderer } from '@mui-internal/test-utils';
import FormControl, { formControlClasses as classes } from '@mui/material/FormControl';
import Input from '@mui/material/Input';
import Select from '@mui/material/Select';
diff --git a/packages/mui-material/src/FormControlLabel/FormControlLabel.test.js b/packages/mui-material/src/FormControlLabel/FormControlLabel.test.js
index f2ef25f819bd64..54711bbc7544d5 100644
--- a/packages/mui-material/src/FormControlLabel/FormControlLabel.test.js
+++ b/packages/mui-material/src/FormControlLabel/FormControlLabel.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import FormControlLabel, {
formControlLabelClasses as classes,
} from '@mui/material/FormControlLabel';
diff --git a/packages/mui-material/src/FormGroup/FormGroup.test.js b/packages/mui-material/src/FormGroup/FormGroup.test.js
index 9321816aa6c2db..6750ca848e023e 100644
--- a/packages/mui-material/src/FormGroup/FormGroup.test.js
+++ b/packages/mui-material/src/FormGroup/FormGroup.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import FormGroup, { formGroupClasses as classes } from '@mui/material/FormGroup';
import FormControl from '@mui/material/FormControl';
diff --git a/packages/mui-material/src/FormHelperText/FormHelperText.test.js b/packages/mui-material/src/FormHelperText/FormHelperText.test.js
index 9d367aac2a5f07..1d56b54bd16a31 100644
--- a/packages/mui-material/src/FormHelperText/FormHelperText.test.js
+++ b/packages/mui-material/src/FormHelperText/FormHelperText.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import FormHelperText, { formHelperTextClasses as classes } from '@mui/material/FormHelperText';
import FormControl from '@mui/material/FormControl';
diff --git a/packages/mui-material/src/FormLabel/FormLabel.test.js b/packages/mui-material/src/FormLabel/FormLabel.test.js
index 3fd3411cd7756a..ca7dee45ad6604 100644
--- a/packages/mui-material/src/FormLabel/FormLabel.test.js
+++ b/packages/mui-material/src/FormLabel/FormLabel.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import { expect } from 'chai';
-import { describeConformance, act, createRenderer } from 'test/utils';
+import { describeConformance, act, createRenderer } from '@mui-internal/test-utils';
import FormLabel, { formLabelClasses as classes } from '@mui/material/FormLabel';
import FormControl, { useFormControl } from '@mui/material/FormControl';
import { hexToRgb } from '@mui/material/styles';
diff --git a/packages/mui-material/src/GlobalStyles/GlobalStyles.test.js b/packages/mui-material/src/GlobalStyles/GlobalStyles.test.js
index 17f9fb7086a77a..7d203be949b1c5 100644
--- a/packages/mui-material/src/GlobalStyles/GlobalStyles.test.js
+++ b/packages/mui-material/src/GlobalStyles/GlobalStyles.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import GlobalStyles from '@mui/material/GlobalStyles';
import { ThemeProvider, createTheme } from '@mui/material//styles/';
diff --git a/packages/mui-material/src/Grid/Grid.test.js b/packages/mui-material/src/Grid/Grid.test.js
index c7b031abdb8446..72d581a9812272 100644
--- a/packages/mui-material/src/Grid/Grid.test.js
+++ b/packages/mui-material/src/Grid/Grid.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, screen } from 'test/utils';
+import { describeConformance, createRenderer, screen } from '@mui-internal/test-utils';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import defaultTheme from '@mui/material/styles/defaultTheme';
import Grid, { gridClasses as classes } from '@mui/material/Grid';
diff --git a/packages/mui-material/src/Grow/Grow.test.js b/packages/mui-material/src/Grow/Grow.test.js
index 9848c3d54dc1af..6c156a3bda9c0d 100644
--- a/packages/mui-material/src/Grow/Grow.test.js
+++ b/packages/mui-material/src/Grow/Grow.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { Transition } from 'react-transition-group';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import Grow from '@mui/material/Grow';
diff --git a/packages/mui-material/src/Hidden/Hidden.test.js b/packages/mui-material/src/Hidden/Hidden.test.js
index 2ab58034152857..f5024fe11fb8fa 100644
--- a/packages/mui-material/src/Hidden/Hidden.test.js
+++ b/packages/mui-material/src/Hidden/Hidden.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import Hidden from '@mui/material/Hidden';
describe('', () => {
diff --git a/packages/mui-material/src/Hidden/HiddenCss.test.js b/packages/mui-material/src/Hidden/HiddenCss.test.js
index 83f7c4f279b0a5..a77e5ebd557b8c 100644
--- a/packages/mui-material/src/Hidden/HiddenCss.test.js
+++ b/packages/mui-material/src/Hidden/HiddenCss.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, strictModeDoubleLoggingSuppressed } from 'test/utils';
+import { createRenderer, strictModeDoubleLoggingSuppressed } from '@mui-internal/test-utils';
import HiddenCss from './HiddenCss';
import { createTheme, ThemeProvider } from '../styles';
import classes from './hiddenCssClasses';
diff --git a/packages/mui-material/src/Hidden/HiddenJs.test.js b/packages/mui-material/src/Hidden/HiddenJs.test.js
index d96dab021d81da..43cc2320c25648 100644
--- a/packages/mui-material/src/Hidden/HiddenJs.test.js
+++ b/packages/mui-material/src/Hidden/HiddenJs.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import HiddenJs from './HiddenJs';
describe('', () => {
diff --git a/packages/mui-material/src/Icon/Icon.test.js b/packages/mui-material/src/Icon/Icon.test.js
index e1c22af46319d5..c4acaff527e05e 100644
--- a/packages/mui-material/src/Icon/Icon.test.js
+++ b/packages/mui-material/src/Icon/Icon.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Icon, { iconClasses as classes } from '@mui/material/Icon';
describe('', () => {
diff --git a/packages/mui-material/src/IconButton/IconButton.test.js b/packages/mui-material/src/IconButton/IconButton.test.js
index 8dcad452cc84f7..7c744f92a59c47 100644
--- a/packages/mui-material/src/IconButton/IconButton.test.js
+++ b/packages/mui-material/src/IconButton/IconButton.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import PropTypes from 'prop-types';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { unstable_capitalize as capitalize } from '@mui/utils';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import IconButton, { iconButtonClasses as classes } from '@mui/material/IconButton';
diff --git a/packages/mui-material/src/ImageList/ImageList.test.js b/packages/mui-material/src/ImageList/ImageList.test.js
index 724dc0dabc8178..d57841ecc61442 100644
--- a/packages/mui-material/src/ImageList/ImageList.test.js
+++ b/packages/mui-material/src/ImageList/ImageList.test.js
@@ -1,6 +1,6 @@
import { expect } from 'chai';
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import ImageList, { imageListClasses as classes } from '@mui/material/ImageList';
const itemsData = [
diff --git a/packages/mui-material/src/ImageListItem/ImageListItem.test.js b/packages/mui-material/src/ImageListItem/ImageListItem.test.js
index d5be030ecccdde..6580c8ded5cd2e 100644
--- a/packages/mui-material/src/ImageListItem/ImageListItem.test.js
+++ b/packages/mui-material/src/ImageListItem/ImageListItem.test.js
@@ -1,6 +1,6 @@
import { expect } from 'chai';
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import ImageList from '@mui/material/ImageList';
import ImageListItem, { imageListItemClasses as classes } from '@mui/material/ImageListItem';
diff --git a/packages/mui-material/src/ImageListItemBar/ImageListItemBar.test.js b/packages/mui-material/src/ImageListItemBar/ImageListItemBar.test.js
index d1165a5c0595f3..64069aad1be4d6 100644
--- a/packages/mui-material/src/ImageListItemBar/ImageListItemBar.test.js
+++ b/packages/mui-material/src/ImageListItemBar/ImageListItemBar.test.js
@@ -1,6 +1,6 @@
import { expect } from 'chai';
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import ImageListItemBar, {
imageListItemBarClasses as classes,
} from '@mui/material/ImageListItemBar';
diff --git a/packages/mui-material/src/Input/Input.test.js b/packages/mui-material/src/Input/Input.test.js
index 111685214225c6..37166718c3245f 100644
--- a/packages/mui-material/src/Input/Input.test.js
+++ b/packages/mui-material/src/Input/Input.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import InputBase from '@mui/material/InputBase';
import Input, { inputClasses as classes } from '@mui/material/Input';
diff --git a/packages/mui-material/src/InputAdornment/InputAdornment.test.js b/packages/mui-material/src/InputAdornment/InputAdornment.test.js
index bf7020be5bec60..8cb9c32096e4b6 100644
--- a/packages/mui-material/src/InputAdornment/InputAdornment.test.js
+++ b/packages/mui-material/src/InputAdornment/InputAdornment.test.js
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, strictModeDoubleLoggingSuppressed } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ strictModeDoubleLoggingSuppressed,
+} from '@mui-internal/test-utils';
import { typographyClasses } from '@mui/material/Typography';
import InputAdornment, { inputAdornmentClasses as classes } from '@mui/material/InputAdornment';
import TextField from '@mui/material/TextField';
diff --git a/packages/mui-material/src/InputBase/InputBase.test.js b/packages/mui-material/src/InputBase/InputBase.test.js
index 789df2c66cf233..f890e3e7ccc41f 100644
--- a/packages/mui-material/src/InputBase/InputBase.test.js
+++ b/packages/mui-material/src/InputBase/InputBase.test.js
@@ -2,7 +2,13 @@ import * as React from 'react';
import PropTypes from 'prop-types';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils';
+import {
+ describeConformance,
+ act,
+ createRenderer,
+ fireEvent,
+ screen,
+} from '@mui-internal/test-utils';
import { ThemeProvider } from '@emotion/react';
import FormControl, { useFormControl } from '@mui/material/FormControl';
import InputAdornment from '@mui/material/InputAdornment';
diff --git a/packages/mui-material/src/InputLabel/InputLabel.test.js b/packages/mui-material/src/InputLabel/InputLabel.test.js
index 3027ef9374aa11..1a1b2a7e038f7c 100644
--- a/packages/mui-material/src/InputLabel/InputLabel.test.js
+++ b/packages/mui-material/src/InputLabel/InputLabel.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import { expect } from 'chai';
-import { describeConformance, act, createRenderer } from 'test/utils';
+import { describeConformance, act, createRenderer } from '@mui-internal/test-utils';
import { ClassNames } from '@emotion/react';
import FormControl from '@mui/material/FormControl';
import Input from '@mui/material/Input';
diff --git a/packages/mui-material/src/LinearProgress/LinearProgress.test.js b/packages/mui-material/src/LinearProgress/LinearProgress.test.js
index ac41f4bb04c7d9..711f01a7b60238 100644
--- a/packages/mui-material/src/LinearProgress/LinearProgress.test.js
+++ b/packages/mui-material/src/LinearProgress/LinearProgress.test.js
@@ -5,7 +5,7 @@ import {
screen,
describeConformance,
strictModeDoubleLoggingSuppressed,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import LinearProgress, { linearProgressClasses as classes } from '@mui/material/LinearProgress';
describe('', () => {
diff --git a/packages/mui-material/src/Link/Link.test.js b/packages/mui-material/src/Link/Link.test.js
index 14a934324e0cce..30130a42049a98 100644
--- a/packages/mui-material/src/Link/Link.test.js
+++ b/packages/mui-material/src/Link/Link.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { act, createRenderer, fireEvent, describeConformance } from 'test/utils';
+import { act, createRenderer, fireEvent, describeConformance } from '@mui-internal/test-utils';
import Link, { linkClasses as classes } from '@mui/material/Link';
import Typography, { typographyClasses } from '@mui/material/Typography';
diff --git a/packages/mui-material/src/List/List.test.js b/packages/mui-material/src/List/List.test.js
index dbaaed4f12af2d..403a0fcd10da75 100644
--- a/packages/mui-material/src/List/List.test.js
+++ b/packages/mui-material/src/List/List.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import ListSubheader, { listSubheaderClasses } from '@mui/material/ListSubheader';
import ListItem, { listItemClasses } from '@mui/material/ListItem';
import List, { listClasses as classes } from '@mui/material/List';
diff --git a/packages/mui-material/src/ListItem/ListItem.test.js b/packages/mui-material/src/ListItem/ListItem.test.js
index 8552b641a0435b..1fb64bf733581b 100644
--- a/packages/mui-material/src/ListItem/ListItem.test.js
+++ b/packages/mui-material/src/ListItem/ListItem.test.js
@@ -1,7 +1,13 @@
import * as React from 'react';
import { expect } from 'chai';
import PropTypes from 'prop-types';
-import { describeConformance, act, createRenderer, fireEvent, queries } from 'test/utils';
+import {
+ describeConformance,
+ act,
+ createRenderer,
+ fireEvent,
+ queries,
+} from '@mui-internal/test-utils';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import ListItemText from '@mui/material/ListItemText';
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
diff --git a/packages/mui-material/src/ListItemAvatar/ListItemAvatar.test.js b/packages/mui-material/src/ListItemAvatar/ListItemAvatar.test.js
index 76ddec77e5a99e..ef933984736f5d 100644
--- a/packages/mui-material/src/ListItemAvatar/ListItemAvatar.test.js
+++ b/packages/mui-material/src/ListItemAvatar/ListItemAvatar.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import ListItemAvatar, { listItemAvatarClasses as classes } from '@mui/material/ListItemAvatar';
describe('', () => {
diff --git a/packages/mui-material/src/ListItemButton/ListItemButton.test.js b/packages/mui-material/src/ListItemButton/ListItemButton.test.js
index 0803b23f795338..ba95529f50fb2a 100644
--- a/packages/mui-material/src/ListItemButton/ListItemButton.test.js
+++ b/packages/mui-material/src/ListItemButton/ListItemButton.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, act, createRenderer, fireEvent } from 'test/utils';
+import { describeConformance, act, createRenderer, fireEvent } from '@mui-internal/test-utils';
import ListItemButton, { listItemButtonClasses as classes } from '@mui/material/ListItemButton';
import ButtonBase from '@mui/material/ButtonBase';
import { ThemeProvider, createTheme } from '@mui/material/styles';
diff --git a/packages/mui-material/src/ListItemIcon/ListItemIcon.test.js b/packages/mui-material/src/ListItemIcon/ListItemIcon.test.js
index 5c8b2482458e8e..541af1b1595457 100644
--- a/packages/mui-material/src/ListItemIcon/ListItemIcon.test.js
+++ b/packages/mui-material/src/ListItemIcon/ListItemIcon.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import ListItemIcon, { listItemIconClasses as classes } from '@mui/material/ListItemIcon';
describe('', () => {
diff --git a/packages/mui-material/src/ListItemSecondaryAction/ListItemSecondaryAction.test.js b/packages/mui-material/src/ListItemSecondaryAction/ListItemSecondaryAction.test.js
index e2e16012d35203..771082fd1883e5 100644
--- a/packages/mui-material/src/ListItemSecondaryAction/ListItemSecondaryAction.test.js
+++ b/packages/mui-material/src/ListItemSecondaryAction/ListItemSecondaryAction.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import ListItem from '@mui/material/ListItem';
import ListItemSecondaryAction, {
listItemSecondaryActionClasses as classes,
diff --git a/packages/mui-material/src/ListItemText/ListItemText.test.js b/packages/mui-material/src/ListItemText/ListItemText.test.js
index 74c763665191f8..f38cda46ea7f62 100644
--- a/packages/mui-material/src/ListItemText/ListItemText.test.js
+++ b/packages/mui-material/src/ListItemText/ListItemText.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Typography, { typographyClasses } from '@mui/material/Typography';
import ListItemText, { listItemTextClasses as classes } from '@mui/material/ListItemText';
diff --git a/packages/mui-material/src/ListSubheader/ListSubheader.test.js b/packages/mui-material/src/ListSubheader/ListSubheader.test.js
index a22f9dcc689f64..9b0720a58d9599 100644
--- a/packages/mui-material/src/ListSubheader/ListSubheader.test.js
+++ b/packages/mui-material/src/ListSubheader/ListSubheader.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import ListSubheader, { listSubheaderClasses as classes } from '@mui/material/ListSubheader';
describe('', () => {
diff --git a/packages/mui-material/src/Menu/Menu.test.js b/packages/mui-material/src/Menu/Menu.test.js
index 902a5843441dd6..0287c5059c6d15 100644
--- a/packages/mui-material/src/Menu/Menu.test.js
+++ b/packages/mui-material/src/Menu/Menu.test.js
@@ -8,7 +8,7 @@ import {
screen,
fireEvent,
strictModeDoubleLoggingSuppressed,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import Menu, { menuClasses as classes } from '@mui/material/Menu';
import Popover from '@mui/material/Popover';
import { createTheme, ThemeProvider } from '@mui/material/styles';
diff --git a/packages/mui-material/src/MenuItem/MenuItem.test.js b/packages/mui-material/src/MenuItem/MenuItem.test.js
index 4289ae49302788..b89f6b3ce692e3 100644
--- a/packages/mui-material/src/MenuItem/MenuItem.test.js
+++ b/packages/mui-material/src/MenuItem/MenuItem.test.js
@@ -1,7 +1,13 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { act, describeConformance, createRenderer, fireEvent, screen } from 'test/utils';
+import {
+ act,
+ describeConformance,
+ createRenderer,
+ fireEvent,
+ screen,
+} from '@mui-internal/test-utils';
import MenuItem, { menuItemClasses as classes } from '@mui/material/MenuItem';
import ButtonBase from '@mui/material/ButtonBase';
import ListContext from '../List/ListContext';
diff --git a/packages/mui-material/src/MenuList/MenuList.test.js b/packages/mui-material/src/MenuList/MenuList.test.js
index c59f6678e1af80..fb6b32e79ce029 100644
--- a/packages/mui-material/src/MenuList/MenuList.test.js
+++ b/packages/mui-material/src/MenuList/MenuList.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { stub } from 'sinon';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import Divider from '@mui/material/Divider';
import MenuList from '@mui/material/MenuList';
import MenuItem from '@mui/material/MenuItem';
diff --git a/packages/mui-material/src/MobileStepper/MobileStepper.test.js b/packages/mui-material/src/MobileStepper/MobileStepper.test.js
index fc124bd985f772..46d60b1c76157b 100644
--- a/packages/mui-material/src/MobileStepper/MobileStepper.test.js
+++ b/packages/mui-material/src/MobileStepper/MobileStepper.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance, fireEvent, screen } from 'test/utils';
+import { createRenderer, describeConformance, fireEvent, screen } from '@mui-internal/test-utils';
import Paper, { paperClasses } from '@mui/material/Paper';
import Button from '@mui/material/Button';
import MobileStepper, { mobileStepperClasses as classes } from '@mui/material/MobileStepper';
diff --git a/packages/mui-material/src/Modal/Modal.test.js b/packages/mui-material/src/Modal/Modal.test.js
index 48fb7f34dd6eb1..39ac7256c19033 100644
--- a/packages/mui-material/src/Modal/Modal.test.js
+++ b/packages/mui-material/src/Modal/Modal.test.js
@@ -3,7 +3,14 @@ import * as ReactDOM from 'react-dom';
import { expect } from 'chai';
import { spy } from 'sinon';
import PropTypes from 'prop-types';
-import { act, createRenderer, fireEvent, within, describeConformance, screen } from 'test/utils';
+import {
+ act,
+ createRenderer,
+ fireEvent,
+ within,
+ describeConformance,
+ screen,
+} from '@mui-internal/test-utils';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import Fade from '@mui/material/Fade';
import Modal, { modalClasses as classes } from '@mui/material/Modal';
diff --git a/packages/mui-material/src/NativeSelect/NativeSelect.test.js b/packages/mui-material/src/NativeSelect/NativeSelect.test.js
index 0d0a538bba2a9a..a61b8b84f29b9b 100644
--- a/packages/mui-material/src/NativeSelect/NativeSelect.test.js
+++ b/packages/mui-material/src/NativeSelect/NativeSelect.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { createTheme, ThemeProvider, styled } from '@mui/material/styles';
import NativeSelect, { nativeSelectClasses as classes } from '@mui/material/NativeSelect';
import Input, { inputClasses } from '@mui/material/Input';
diff --git a/packages/mui-material/src/NativeSelect/NativeSelectInput.test.js b/packages/mui-material/src/NativeSelect/NativeSelectInput.test.js
index 28e4a4867f5a0c..268a8e7d197bb9 100644
--- a/packages/mui-material/src/NativeSelect/NativeSelectInput.test.js
+++ b/packages/mui-material/src/NativeSelect/NativeSelectInput.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, createRenderer, fireEvent } from 'test/utils';
+import { describeConformance, createRenderer, fireEvent } from '@mui-internal/test-utils';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import NativeSelectInput from './NativeSelectInput';
import nativeSelectClasses from './nativeSelectClasses';
diff --git a/packages/mui-material/src/OutlinedInput/NotchedOutline.test.js b/packages/mui-material/src/OutlinedInput/NotchedOutline.test.js
index 5b398479a4ceba..071166efd9645a 100644
--- a/packages/mui-material/src/OutlinedInput/NotchedOutline.test.js
+++ b/packages/mui-material/src/OutlinedInput/NotchedOutline.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import NotchedOutline from './NotchedOutline';
diff --git a/packages/mui-material/src/OutlinedInput/OutlinedInput.test.js b/packages/mui-material/src/OutlinedInput/OutlinedInput.test.js
index cbca44086563f3..870d01a78609d7 100644
--- a/packages/mui-material/src/OutlinedInput/OutlinedInput.test.js
+++ b/packages/mui-material/src/OutlinedInput/OutlinedInput.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import OutlinedInput, { outlinedInputClasses as classes } from '@mui/material/OutlinedInput';
import InputBase from '@mui/material/InputBase';
diff --git a/packages/mui-material/src/Pagination/Pagination.test.js b/packages/mui-material/src/Pagination/Pagination.test.js
index efe1ae31100c3f..5b755ec2991220 100644
--- a/packages/mui-material/src/Pagination/Pagination.test.js
+++ b/packages/mui-material/src/Pagination/Pagination.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import Pagination, { paginationClasses as classes } from '@mui/material/Pagination';
import { paginationItemClasses } from '@mui/material/PaginationItem';
diff --git a/packages/mui-material/src/PaginationItem/PaginationItem.test.js b/packages/mui-material/src/PaginationItem/PaginationItem.test.js
index 39efb6fe667581..c469b912380481 100644
--- a/packages/mui-material/src/PaginationItem/PaginationItem.test.js
+++ b/packages/mui-material/src/PaginationItem/PaginationItem.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import PaginationItem, { paginationItemClasses as classes } from '@mui/material/PaginationItem';
describe('', () => {
diff --git a/packages/mui-material/src/Paper/Paper.test.js b/packages/mui-material/src/Paper/Paper.test.js
index 98664deeaff0d3..46c1d427be721f 100644
--- a/packages/mui-material/src/Paper/Paper.test.js
+++ b/packages/mui-material/src/Paper/Paper.test.js
@@ -1,7 +1,11 @@
import * as React from 'react';
import { expect } from 'chai';
import PropTypes from 'prop-types';
-import { createRenderer, describeConformance, strictModeDoubleLoggingSuppressed } from 'test/utils';
+import {
+ createRenderer,
+ describeConformance,
+ strictModeDoubleLoggingSuppressed,
+} from '@mui-internal/test-utils';
import Paper, { paperClasses as classes } from '@mui/material/Paper';
import { createTheme, ThemeProvider } from '@mui/material/styles';
diff --git a/packages/mui-material/src/Popover/Popover.test.js b/packages/mui-material/src/Popover/Popover.test.js
index e39d353d37111e..3802fd4c228517 100644
--- a/packages/mui-material/src/Popover/Popover.test.js
+++ b/packages/mui-material/src/Popover/Popover.test.js
@@ -1,7 +1,13 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy, stub, match } from 'sinon';
-import { act, createMount, createRenderer, describeConformance, screen } from 'test/utils';
+import {
+ act,
+ createMount,
+ createRenderer,
+ describeConformance,
+ screen,
+} from '@mui-internal/test-utils';
import PropTypes from 'prop-types';
import Grow from '@mui/material/Grow';
import Modal from '@mui/material/Modal';
diff --git a/packages/mui-material/src/Popper/Popper.test.js b/packages/mui-material/src/Popper/Popper.test.js
index 6fd5ff0aa0df02..74162a2c04da51 100644
--- a/packages/mui-material/src/Popper/Popper.test.js
+++ b/packages/mui-material/src/Popper/Popper.test.js
@@ -1,6 +1,12 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils';
+import {
+ describeConformance,
+ act,
+ createRenderer,
+ fireEvent,
+ screen,
+} from '@mui-internal/test-utils';
import { ThemeProvider, createTheme } from '@mui/system';
import Grow from '@mui/material/Grow';
import Popper from '@mui/material/Popper';
diff --git a/packages/mui-material/src/Radio/Radio.test.js b/packages/mui-material/src/Radio/Radio.test.js
index 41a6f49919f911..c10574bf33bf53 100644
--- a/packages/mui-material/src/Radio/Radio.test.js
+++ b/packages/mui-material/src/Radio/Radio.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import Radio, { radioClasses as classes } from '@mui/material/Radio';
import FormControl from '@mui/material/FormControl';
import ButtonBase from '@mui/material/ButtonBase';
diff --git a/packages/mui-material/src/RadioGroup/RadioGroup.test.js b/packages/mui-material/src/RadioGroup/RadioGroup.test.js
index cbbd5ada49d98f..f0fb81a9869f50 100644
--- a/packages/mui-material/src/RadioGroup/RadioGroup.test.js
+++ b/packages/mui-material/src/RadioGroup/RadioGroup.test.js
@@ -2,7 +2,13 @@ import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
import PropTypes from 'prop-types';
-import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils';
+import {
+ describeConformance,
+ act,
+ createRenderer,
+ fireEvent,
+ screen,
+} from '@mui-internal/test-utils';
import FormGroup from '@mui/material/FormGroup';
import Radio from '@mui/material/Radio';
import RadioGroup, { useRadioGroup } from '@mui/material/RadioGroup';
diff --git a/packages/mui-material/src/Rating/Rating.test.js b/packages/mui-material/src/Rating/Rating.test.js
index 8323fb3238ba35..edba69206fefed 100644
--- a/packages/mui-material/src/Rating/Rating.test.js
+++ b/packages/mui-material/src/Rating/Rating.test.js
@@ -1,7 +1,13 @@
import * as React from 'react';
import { expect } from 'chai';
import { stub, spy } from 'sinon';
-import { act, describeConformance, createRenderer, fireEvent, screen } from 'test/utils';
+import {
+ act,
+ describeConformance,
+ createRenderer,
+ fireEvent,
+ screen,
+} from '@mui-internal/test-utils';
import Rating, { ratingClasses as classes } from '@mui/material/Rating';
import { createTheme, ThemeProvider } from '@mui/material/styles';
diff --git a/packages/mui-material/src/ScopedCssBaseline/ScopedCssBaseline.test.js b/packages/mui-material/src/ScopedCssBaseline/ScopedCssBaseline.test.js
index 860223aba311d7..8fef049dda9d3b 100644
--- a/packages/mui-material/src/ScopedCssBaseline/ScopedCssBaseline.test.js
+++ b/packages/mui-material/src/ScopedCssBaseline/ScopedCssBaseline.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import ScopedCssBaseline, {
scopedCssBaselineClasses as classes,
} from '@mui/material/ScopedCssBaseline';
diff --git a/packages/mui-material/src/Select/Select.test.js b/packages/mui-material/src/Select/Select.test.js
index cf99abe6b161f9..8668adf7ca8f22 100644
--- a/packages/mui-material/src/Select/Select.test.js
+++ b/packages/mui-material/src/Select/Select.test.js
@@ -8,7 +8,7 @@ import {
createRenderer,
fireEvent,
screen,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import MenuItem, { menuItemClasses } from '@mui/material/MenuItem';
import ListSubheader from '@mui/material/ListSubheader';
diff --git a/packages/mui-material/src/Skeleton/Skeleton.test.js b/packages/mui-material/src/Skeleton/Skeleton.test.js
index 8ec3201c3c7ef1..41bd8d67eec034 100644
--- a/packages/mui-material/src/Skeleton/Skeleton.test.js
+++ b/packages/mui-material/src/Skeleton/Skeleton.test.js
@@ -1,6 +1,6 @@
import { expect } from 'chai';
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Skeleton, { skeletonClasses as classes } from '@mui/material/Skeleton';
describe('', () => {
diff --git a/packages/mui-material/src/Slide/Slide.test.js b/packages/mui-material/src/Slide/Slide.test.js
index 8fad53168b56b8..5f0a315ef0a3e6 100644
--- a/packages/mui-material/src/Slide/Slide.test.js
+++ b/packages/mui-material/src/Slide/Slide.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy, stub } from 'sinon';
-import { act, createRenderer, describeConformance } from 'test/utils';
+import { act, createRenderer, describeConformance } from '@mui-internal/test-utils';
import { Transition } from 'react-transition-group';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import Slide from '@mui/material/Slide';
diff --git a/packages/mui-material/src/Slider/Slider.test.js b/packages/mui-material/src/Slider/Slider.test.js
index 728396a2cf84d1..0684d6eac6502e 100644
--- a/packages/mui-material/src/Slider/Slider.test.js
+++ b/packages/mui-material/src/Slider/Slider.test.js
@@ -2,7 +2,13 @@ import * as React from 'react';
import PropTypes from 'prop-types';
import { spy, stub } from 'sinon';
import { expect } from 'chai';
-import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils';
+import {
+ describeConformance,
+ act,
+ createRenderer,
+ fireEvent,
+ screen,
+} from '@mui-internal/test-utils';
import { Slider as BaseSlider } from '@mui/base/Slider';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import Slider, { sliderClasses as classes } from '@mui/material/Slider';
diff --git a/packages/mui-material/src/Snackbar/Snackbar.test.js b/packages/mui-material/src/Snackbar/Snackbar.test.js
index eb047ec23e714d..f7756616cfa040 100644
--- a/packages/mui-material/src/Snackbar/Snackbar.test.js
+++ b/packages/mui-material/src/Snackbar/Snackbar.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, act, createRenderer, fireEvent } from 'test/utils';
+import { describeConformance, act, createRenderer, fireEvent } from '@mui-internal/test-utils';
import Snackbar, { snackbarClasses as classes } from '@mui/material/Snackbar';
import { ThemeProvider, createTheme } from '@mui/material/styles';
diff --git a/packages/mui-material/src/SnackbarContent/SnackbarContent.test.js b/packages/mui-material/src/SnackbarContent/SnackbarContent.test.js
index 82098f59278357..0d1a0ac6886fce 100644
--- a/packages/mui-material/src/SnackbarContent/SnackbarContent.test.js
+++ b/packages/mui-material/src/SnackbarContent/SnackbarContent.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Paper from '@mui/material/Paper';
import SnackbarContent, { snackbarContentClasses as classes } from '@mui/material/SnackbarContent';
diff --git a/packages/mui-material/src/SpeedDial/SpeedDial.test.js b/packages/mui-material/src/SpeedDial/SpeedDial.test.js
index ac7ad19fd3b3c7..c3776fffaa8b87 100644
--- a/packages/mui-material/src/SpeedDial/SpeedDial.test.js
+++ b/packages/mui-material/src/SpeedDial/SpeedDial.test.js
@@ -8,7 +8,7 @@ import {
fireDiscreteEvent,
screen,
describeConformance,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import Icon from '@mui/material/Icon';
import SpeedDial, { speedDialClasses as classes } from '@mui/material/SpeedDial';
import SpeedDialAction from '@mui/material/SpeedDialAction';
diff --git a/packages/mui-material/src/SpeedDialAction/SpeedDialAction.test.js b/packages/mui-material/src/SpeedDialAction/SpeedDialAction.test.js
index a78f5bebd31de0..0a47c2da1e5db5 100644
--- a/packages/mui-material/src/SpeedDialAction/SpeedDialAction.test.js
+++ b/packages/mui-material/src/SpeedDialAction/SpeedDialAction.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, fireEvent } from 'test/utils';
+import { describeConformance, createRenderer, fireEvent } from '@mui-internal/test-utils';
import Icon from '@mui/material/Icon';
import Tooltip from '@mui/material/Tooltip';
import { fabClasses } from '@mui/material/Fab';
diff --git a/packages/mui-material/src/SpeedDialIcon/SpeedDialIcon.test.js b/packages/mui-material/src/SpeedDialIcon/SpeedDialIcon.test.js
index fd09ff38ce2d0b..1ebce54b98ceee 100644
--- a/packages/mui-material/src/SpeedDialIcon/SpeedDialIcon.test.js
+++ b/packages/mui-material/src/SpeedDialIcon/SpeedDialIcon.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Icon from '@mui/material/Icon';
import SpeedDialIcon, { speedDialIconClasses as classes } from '@mui/material/SpeedDialIcon';
diff --git a/packages/mui-material/src/Stack/Stack.test.js b/packages/mui-material/src/Stack/Stack.test.js
index a95d40de219861..5e7d58fb4ac7d5 100644
--- a/packages/mui-material/src/Stack/Stack.test.js
+++ b/packages/mui-material/src/Stack/Stack.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import Stack, { stackClasses as classes } from '@mui/material/Stack';
// The main tests are in mui-system Stack folder
diff --git a/packages/mui-material/src/Step/Step.test.js b/packages/mui-material/src/Step/Step.test.js
index 9d744ff1082319..b502c0bc2e94d2 100644
--- a/packages/mui-material/src/Step/Step.test.js
+++ b/packages/mui-material/src/Step/Step.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Step, { stepClasses as classes } from '@mui/material/Step';
import Stepper from '@mui/material/Stepper';
import StepLabel, { stepLabelClasses } from '@mui/material/StepLabel';
diff --git a/packages/mui-material/src/StepButton/StepButton.test.js b/packages/mui-material/src/StepButton/StepButton.test.js
index c5ef4c5e400911..edd518ac105f4f 100644
--- a/packages/mui-material/src/StepButton/StepButton.test.js
+++ b/packages/mui-material/src/StepButton/StepButton.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { fireEvent } from '@testing-library/dom';
import StepButton, { stepButtonClasses as classes } from '@mui/material/StepButton';
import Step from '@mui/material/Step';
diff --git a/packages/mui-material/src/StepConnector/StepConnector.test.js b/packages/mui-material/src/StepConnector/StepConnector.test.js
index eff3dadaadcb4c..7407f76a23273d 100644
--- a/packages/mui-material/src/StepConnector/StepConnector.test.js
+++ b/packages/mui-material/src/StepConnector/StepConnector.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Stepper from '@mui/material/Stepper';
import Step from '@mui/material/Step';
import StepConnector, { stepConnectorClasses as classes } from '@mui/material/StepConnector';
diff --git a/packages/mui-material/src/StepContent/StepContent.test.js b/packages/mui-material/src/StepContent/StepContent.test.js
index 401e523b1fe00b..a6f8aa56581bbd 100644
--- a/packages/mui-material/src/StepContent/StepContent.test.js
+++ b/packages/mui-material/src/StepContent/StepContent.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { collapseClasses } from '@mui/material/Collapse';
import Stepper from '@mui/material/Stepper';
import Step from '@mui/material/Step';
diff --git a/packages/mui-material/src/StepIcon/StepIcon.test.js b/packages/mui-material/src/StepIcon/StepIcon.test.js
index 0bc49f279d115a..759c001e330d24 100644
--- a/packages/mui-material/src/StepIcon/StepIcon.test.js
+++ b/packages/mui-material/src/StepIcon/StepIcon.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import StepIcon, { stepIconClasses as classes } from '@mui/material/StepIcon';
describe('', () => {
diff --git a/packages/mui-material/src/StepLabel/StepLabel.test.js b/packages/mui-material/src/StepLabel/StepLabel.test.js
index fb00e634650b86..799d2f1b1d2f9e 100644
--- a/packages/mui-material/src/StepLabel/StepLabel.test.js
+++ b/packages/mui-material/src/StepLabel/StepLabel.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Typography from '@mui/material/Typography';
import Stepper from '@mui/material/Stepper';
import Step from '@mui/material/Step';
diff --git a/packages/mui-material/src/Stepper/Stepper.test.tsx b/packages/mui-material/src/Stepper/Stepper.test.tsx
index 17138c559727b3..d398d964d04ce7 100644
--- a/packages/mui-material/src/Stepper/Stepper.test.tsx
+++ b/packages/mui-material/src/Stepper/Stepper.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Step, { StepProps, stepClasses } from '@mui/material/Step';
import StepLabel from '@mui/material/StepLabel';
import StepConnector, { stepConnectorClasses } from '@mui/material/StepConnector';
diff --git a/packages/mui-material/src/SvgIcon/SvgIcon.test.js b/packages/mui-material/src/SvgIcon/SvgIcon.test.js
index 27211f44e6811c..9adff89d0b00bc 100644
--- a/packages/mui-material/src/SvgIcon/SvgIcon.test.js
+++ b/packages/mui-material/src/SvgIcon/SvgIcon.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import SvgIcon, { svgIconClasses as classes } from '@mui/material/SvgIcon';
describe('', () => {
diff --git a/packages/mui-material/src/SwipeableDrawer/SwipeableDrawer.test.js b/packages/mui-material/src/SwipeableDrawer/SwipeableDrawer.test.js
index f0b537504d53cd..0fe3afcd6e7def 100644
--- a/packages/mui-material/src/SwipeableDrawer/SwipeableDrawer.test.js
+++ b/packages/mui-material/src/SwipeableDrawer/SwipeableDrawer.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { fireEvent, createRenderer, describeConformance, screen } from 'test/utils';
+import { fireEvent, createRenderer, describeConformance, screen } from '@mui-internal/test-utils';
import PropTypes, { checkPropTypes } from 'prop-types';
import SwipeableDrawer from '@mui/material/SwipeableDrawer';
import Drawer, { drawerClasses } from '@mui/material/Drawer';
diff --git a/packages/mui-material/src/Switch/Switch.test.js b/packages/mui-material/src/Switch/Switch.test.js
index af1934d0459f1b..6d34c4a10aa098 100644
--- a/packages/mui-material/src/Switch/Switch.test.js
+++ b/packages/mui-material/src/Switch/Switch.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, act, createRenderer, fireEvent } from 'test/utils';
+import { describeConformance, act, createRenderer, fireEvent } from '@mui-internal/test-utils';
import Switch, { switchClasses as classes } from '@mui/material/Switch';
import FormControl from '@mui/material/FormControl';
diff --git a/packages/mui-material/src/Tab/Tab.test.js b/packages/mui-material/src/Tab/Tab.test.js
index b52f9dc1e7b66c..4aabc73afffd9c 100644
--- a/packages/mui-material/src/Tab/Tab.test.js
+++ b/packages/mui-material/src/Tab/Tab.test.js
@@ -1,7 +1,7 @@
import { expect } from 'chai';
import * as React from 'react';
import { spy } from 'sinon';
-import { act, createRenderer, describeConformance, fireEvent } from 'test/utils';
+import { act, createRenderer, describeConformance, fireEvent } from '@mui-internal/test-utils';
import Tab, { tabClasses as classes } from '@mui/material/Tab';
import ButtonBase from '@mui/material/ButtonBase';
diff --git a/packages/mui-material/src/TabScrollButton/TabScrollButton.test.js b/packages/mui-material/src/TabScrollButton/TabScrollButton.test.js
index 5148ae68313fc1..00aa3b267dffc7 100644
--- a/packages/mui-material/src/TabScrollButton/TabScrollButton.test.js
+++ b/packages/mui-material/src/TabScrollButton/TabScrollButton.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
import TabScrollButton, { tabScrollButtonClasses as classes } from '@mui/material/TabScrollButton';
diff --git a/packages/mui-material/src/Table/Table.test.js b/packages/mui-material/src/Table/Table.test.js
index 243748ef7c50fc..eeda37bc0b84bc 100644
--- a/packages/mui-material/src/Table/Table.test.js
+++ b/packages/mui-material/src/Table/Table.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Table, { tableClasses as classes } from '@mui/material/Table';
import TableContext from './TableContext';
diff --git a/packages/mui-material/src/TableBody/TableBody.test.js b/packages/mui-material/src/TableBody/TableBody.test.js
index be1e4789899b8a..1cfeaf78f72d82 100644
--- a/packages/mui-material/src/TableBody/TableBody.test.js
+++ b/packages/mui-material/src/TableBody/TableBody.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import TableBody, { tableBodyClasses as classes } from '@mui/material/TableBody';
import Tablelvl2Context from '../Table/Tablelvl2Context';
diff --git a/packages/mui-material/src/TableCell/TableCell.test.js b/packages/mui-material/src/TableCell/TableCell.test.js
index 776ed9241ff7c6..ed27e168fb2944 100644
--- a/packages/mui-material/src/TableCell/TableCell.test.js
+++ b/packages/mui-material/src/TableCell/TableCell.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import TableCell, { tableCellClasses as classes } from '@mui/material/TableCell';
import TableHead from '@mui/material/TableHead';
import TableRow from '@mui/material/TableRow';
diff --git a/packages/mui-material/src/TableContainer/TableContainer.test.js b/packages/mui-material/src/TableContainer/TableContainer.test.js
index 2c2f58b42d54d3..4d28809934c7b8 100644
--- a/packages/mui-material/src/TableContainer/TableContainer.test.js
+++ b/packages/mui-material/src/TableContainer/TableContainer.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import TableContainer, { tableContainerClasses as classes } from '@mui/material/TableContainer';
describe('', () => {
diff --git a/packages/mui-material/src/TableFooter/TableFooter.test.js b/packages/mui-material/src/TableFooter/TableFooter.test.js
index 7a25ee32fb8ecf..7663e25c27f4df 100644
--- a/packages/mui-material/src/TableFooter/TableFooter.test.js
+++ b/packages/mui-material/src/TableFooter/TableFooter.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import TableFooter, { tableFooterClasses as classes } from '@mui/material/TableFooter';
import Tablelvl2Context from '../Table/Tablelvl2Context';
diff --git a/packages/mui-material/src/TableHead/TableHead.test.js b/packages/mui-material/src/TableHead/TableHead.test.js
index f24289d0411003..5a7203d1d8b08a 100644
--- a/packages/mui-material/src/TableHead/TableHead.test.js
+++ b/packages/mui-material/src/TableHead/TableHead.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import TableHead, { tableHeadClasses as classes } from '@mui/material/TableHead';
import Tablelvl2Context from '../Table/Tablelvl2Context';
diff --git a/packages/mui-material/src/TablePagination/TablePagination.test.js b/packages/mui-material/src/TablePagination/TablePagination.test.js
index 53a3f7969ce6b4..2e7fb24023e358 100644
--- a/packages/mui-material/src/TablePagination/TablePagination.test.js
+++ b/packages/mui-material/src/TablePagination/TablePagination.test.js
@@ -2,7 +2,7 @@ import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
import PropTypes from 'prop-types';
-import { describeConformance, fireEvent, createRenderer } from 'test/utils';
+import { describeConformance, fireEvent, createRenderer } from '@mui-internal/test-utils';
import TableFooter from '@mui/material/TableFooter';
import TableCell from '@mui/material/TableCell';
import TableRow from '@mui/material/TableRow';
diff --git a/packages/mui-material/src/TableRow/TableRow.test.js b/packages/mui-material/src/TableRow/TableRow.test.js
index 0c19fb067d1169..8d1adea00bf799 100644
--- a/packages/mui-material/src/TableRow/TableRow.test.js
+++ b/packages/mui-material/src/TableRow/TableRow.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import TableRow, { tableRowClasses as classes } from '@mui/material/TableRow';
describe('', () => {
diff --git a/packages/mui-material/src/TableSortLabel/TableSortLabel.test.js b/packages/mui-material/src/TableSortLabel/TableSortLabel.test.js
index 20eeb8326c71e4..74e4e0449a3f0e 100644
--- a/packages/mui-material/src/TableSortLabel/TableSortLabel.test.js
+++ b/packages/mui-material/src/TableSortLabel/TableSortLabel.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import SortIcon from '@mui/icons-material/Sort';
import TableSortLabel, { tableSortLabelClasses as classes } from '@mui/material/TableSortLabel';
import ButtonBase from '@mui/material/ButtonBase';
diff --git a/packages/mui-material/src/Tabs/ScrollbarSize.test.js b/packages/mui-material/src/Tabs/ScrollbarSize.test.js
index 261a636223a50b..eb6e6899303525 100644
--- a/packages/mui-material/src/Tabs/ScrollbarSize.test.js
+++ b/packages/mui-material/src/Tabs/ScrollbarSize.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy, stub } from 'sinon';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import ScrollbarSize from './ScrollbarSize';
describe('', () => {
diff --git a/packages/mui-material/src/Tabs/Tabs.test.js b/packages/mui-material/src/Tabs/Tabs.test.js
index e6bf75b31c0801..da655ecff49149 100644
--- a/packages/mui-material/src/Tabs/Tabs.test.js
+++ b/packages/mui-material/src/Tabs/Tabs.test.js
@@ -9,7 +9,7 @@ import {
screen,
strictModeDoubleLoggingSuppressed,
waitFor,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
import Tab from '@mui/material/Tab';
diff --git a/packages/mui-material/src/TextField/TextField.test.js b/packages/mui-material/src/TextField/TextField.test.js
index b0910a0b22bbdb..a0cb54184e6d46 100644
--- a/packages/mui-material/src/TextField/TextField.test.js
+++ b/packages/mui-material/src/TextField/TextField.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer, describeConformance, fireEvent } from 'test/utils';
+import { createRenderer, describeConformance, fireEvent } from '@mui-internal/test-utils';
import FormControl from '@mui/material/FormControl';
import { inputBaseClasses } from '@mui/material/InputBase';
import MenuItem from '@mui/material/MenuItem';
diff --git a/packages/mui-material/src/ToggleButton/ToggleButton.test.js b/packages/mui-material/src/ToggleButton/ToggleButton.test.js
index d262aca1baa5b2..f0b11ae00b3842 100644
--- a/packages/mui-material/src/ToggleButton/ToggleButton.test.js
+++ b/packages/mui-material/src/ToggleButton/ToggleButton.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import ToggleButton, { toggleButtonClasses as classes } from '@mui/material/ToggleButton';
import ButtonBase from '@mui/material/ButtonBase';
diff --git a/packages/mui-material/src/ToggleButtonGroup/ToggleButtonGroup.test.js b/packages/mui-material/src/ToggleButtonGroup/ToggleButtonGroup.test.js
index 37580b0bf8f5c1..a5e64d27e0a8c4 100644
--- a/packages/mui-material/src/ToggleButtonGroup/ToggleButtonGroup.test.js
+++ b/packages/mui-material/src/ToggleButtonGroup/ToggleButtonGroup.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, createRenderer, screen } from 'test/utils';
+import { describeConformance, createRenderer, screen } from '@mui-internal/test-utils';
import ToggleButtonGroup, {
toggleButtonGroupClasses as classes,
} from '@mui/material/ToggleButtonGroup';
diff --git a/packages/mui-material/src/Toolbar/Toolbar.test.js b/packages/mui-material/src/Toolbar/Toolbar.test.js
index e47bb096b749c6..4c25e64e3ff726 100644
--- a/packages/mui-material/src/Toolbar/Toolbar.test.js
+++ b/packages/mui-material/src/Toolbar/Toolbar.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Toolbar, { toolbarClasses as classes } from '@mui/material/Toolbar';
describe('', () => {
diff --git a/packages/mui-material/src/Tooltip/Tooltip.test.js b/packages/mui-material/src/Tooltip/Tooltip.test.js
index ac548a591ca5a4..3449b13e53dd61 100644
--- a/packages/mui-material/src/Tooltip/Tooltip.test.js
+++ b/packages/mui-material/src/Tooltip/Tooltip.test.js
@@ -10,7 +10,7 @@ import {
simulatePointerDevice,
focusVisible,
programmaticFocusTriggersFocusVisible,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import { camelCase } from 'lodash/string';
import Tooltip, { tooltipClasses as classes } from '@mui/material/Tooltip';
import { testReset } from './Tooltip';
diff --git a/packages/mui-material/src/Typography/Typography.test.js b/packages/mui-material/src/Typography/Typography.test.js
index e6877e3339bb57..99ac1bf1be7247 100644
--- a/packages/mui-material/src/Typography/Typography.test.js
+++ b/packages/mui-material/src/Typography/Typography.test.js
@@ -1,7 +1,7 @@
// @ts-check
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Typography, { typographyClasses as classes } from '@mui/material/Typography';
describe('', () => {
diff --git a/packages/mui-material/src/Unstable_Grid2/Grid2.test.js b/packages/mui-material/src/Unstable_Grid2/Grid2.test.js
index 43ccba34d379b0..034a45b4145ab4 100644
--- a/packages/mui-material/src/Unstable_Grid2/Grid2.test.js
+++ b/packages/mui-material/src/Unstable_Grid2/Grid2.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import Grid2, { grid2Classes as classes } from '@mui/material/Unstable_Grid2';
// The main tests are in mui-system Unstable_Grid folder
diff --git a/packages/mui-material/src/Zoom/Zoom.test.js b/packages/mui-material/src/Zoom/Zoom.test.js
index 13adbead2d08f5..78a1da94103b5c 100644
--- a/packages/mui-material/src/Zoom/Zoom.test.js
+++ b/packages/mui-material/src/Zoom/Zoom.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import { Transition } from 'react-transition-group';
import Zoom from '@mui/material/Zoom';
import { ThemeProvider, createTheme } from '@mui/material/styles';
diff --git a/packages/mui-material/src/internal/SwitchBase.test.js b/packages/mui-material/src/internal/SwitchBase.test.js
index f197f98ab76c42..a40e478f719c44 100644
--- a/packages/mui-material/src/internal/SwitchBase.test.js
+++ b/packages/mui-material/src/internal/SwitchBase.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { describeConformance, act, createRenderer } from 'test/utils';
+import { describeConformance, act, createRenderer } from '@mui-internal/test-utils';
import SwitchBase from './SwitchBase';
import FormControl, { useFormControl } from '../FormControl';
import ButtonBase from '../ButtonBase';
diff --git a/packages/mui-material/src/styles/CssVarsProvider.test.js b/packages/mui-material/src/styles/CssVarsProvider.test.js
index b12643e48eb087..bb9c57846fa19d 100644
--- a/packages/mui-material/src/styles/CssVarsProvider.test.js
+++ b/packages/mui-material/src/styles/CssVarsProvider.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, screen } from 'test/utils';
+import { createRenderer, screen } from '@mui-internal/test-utils';
import Box from '@mui/material/Box';
import { Experimental_CssVarsProvider as CssVarsProvider, useTheme } from '@mui/material/styles';
diff --git a/packages/mui-material/src/styles/ThemeProvider.test.tsx b/packages/mui-material/src/styles/ThemeProvider.test.tsx
index b69df12d8ac103..48833d7d5e93ce 100644
--- a/packages/mui-material/src/styles/ThemeProvider.test.tsx
+++ b/packages/mui-material/src/styles/ThemeProvider.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { ThemeProvider } from '@mui/material/styles';
describe('ThemeProvider', () => {
diff --git a/packages/mui-material/src/styles/createTheme.test.js b/packages/mui-material/src/styles/createTheme.test.js
index 4e780610185c2d..d9737b9a3c52e1 100644
--- a/packages/mui-material/src/styles/createTheme.test.js
+++ b/packages/mui-material/src/styles/createTheme.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import Button from '@mui/material/Button';
import Box from '@mui/material/Box';
import { ThemeProvider, createTheme } from '@mui/material/styles';
diff --git a/packages/mui-material/src/styles/experimental_extendTheme.test.js b/packages/mui-material/src/styles/experimental_extendTheme.test.js
index 092a76ba8c910f..04b73a0f7eebd0 100644
--- a/packages/mui-material/src/styles/experimental_extendTheme.test.js
+++ b/packages/mui-material/src/styles/experimental_extendTheme.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import Button from '@mui/material/Button';
import {
Experimental_CssVarsProvider as CssVarsProvider,
diff --git a/packages/mui-material/src/styles/styled.test.js b/packages/mui-material/src/styles/styled.test.js
index a6e3f2d0b30600..3402325b32f36d 100644
--- a/packages/mui-material/src/styles/styled.test.js
+++ b/packages/mui-material/src/styles/styled.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, screen } from 'test/utils';
+import { createRenderer, screen } from '@mui-internal/test-utils';
import createTheme from './createTheme';
import styled from './styled';
import ThemeProvider from './ThemeProvider';
diff --git a/packages/mui-material/src/useMediaQuery/useMediaQuery.test.js b/packages/mui-material/src/useMediaQuery/useMediaQuery.test.js
index 2d29f806cb5126..d2f91a1822ab53 100644
--- a/packages/mui-material/src/useMediaQuery/useMediaQuery.test.js
+++ b/packages/mui-material/src/useMediaQuery/useMediaQuery.test.js
@@ -6,7 +6,7 @@ import {
screen,
RenderCounter,
strictModeDoubleLoggingSuppressed,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import mediaQuery from 'css-mediaquery';
import { expect } from 'chai';
import { stub } from 'sinon';
diff --git a/packages/mui-material/src/usePagination/usePagination.test.js b/packages/mui-material/src/usePagination/usePagination.test.js
index 93ed65e2a43c03..993c0c157670c8 100644
--- a/packages/mui-material/src/usePagination/usePagination.test.js
+++ b/packages/mui-material/src/usePagination/usePagination.test.js
@@ -1,5 +1,5 @@
import * as React from 'react';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { expect } from 'chai';
import usePagination from '@mui/material/usePagination';
diff --git a/packages/mui-material/src/useScrollTrigger/useScrollTrigger.test.js b/packages/mui-material/src/useScrollTrigger/useScrollTrigger.test.js
index b1ff89955d8f6f..664ac0894181d2 100644
--- a/packages/mui-material/src/useScrollTrigger/useScrollTrigger.test.js
+++ b/packages/mui-material/src/useScrollTrigger/useScrollTrigger.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import { expect } from 'chai';
-import { act, createRenderer, RenderCounter, screen } from 'test/utils';
+import { act, createRenderer, RenderCounter, screen } from '@mui-internal/test-utils';
import useScrollTrigger from '@mui/material/useScrollTrigger';
import Container from '@mui/material/Container';
import Box from '@mui/material/Box';
diff --git a/packages/mui-material/test/integration/DialogIntegration.test.js b/packages/mui-material/test/integration/DialogIntegration.test.js
index 47f9b16f9a0ecd..aa0a013092dec2 100644
--- a/packages/mui-material/test/integration/DialogIntegration.test.js
+++ b/packages/mui-material/test/integration/DialogIntegration.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, screen } from 'test/utils';
+import { createRenderer, screen } from '@mui-internal/test-utils';
import Dialog from '@mui/material/Dialog';
import DialogTitle from '@mui/material/DialogTitle';
diff --git a/packages/mui-material/test/integration/Menu.test.js b/packages/mui-material/test/integration/Menu.test.js
index f13e8c10fef95b..1f36ee815e6114 100644
--- a/packages/mui-material/test/integration/Menu.test.js
+++ b/packages/mui-material/test/integration/Menu.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import { expect } from 'chai';
-import { act, createRenderer, fireEvent, screen } from 'test/utils';
+import { act, createRenderer, fireEvent, screen } from '@mui-internal/test-utils';
import Button from '@mui/material/Button';
import MenuItem from '@mui/material/MenuItem';
import Menu from '@mui/material/Menu';
diff --git a/packages/mui-material/test/integration/MenuList.test.js b/packages/mui-material/test/integration/MenuList.test.js
index 9a5d7a4be63d27..ec2a3dc9535f81 100644
--- a/packages/mui-material/test/integration/MenuList.test.js
+++ b/packages/mui-material/test/integration/MenuList.test.js
@@ -7,7 +7,7 @@ import {
fireEvent,
screen,
programmaticFocusTriggersFocusVisible,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import MenuList from '@mui/material/MenuList';
import MenuItem from '@mui/material/MenuItem';
import Divider from '@mui/material/Divider';
diff --git a/packages/mui-material/test/integration/NestedMenu.test.js b/packages/mui-material/test/integration/NestedMenu.test.js
index f85c631d547798..066971cbbab5f3 100644
--- a/packages/mui-material/test/integration/NestedMenu.test.js
+++ b/packages/mui-material/test/integration/NestedMenu.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, within } from 'test/utils';
+import { createRenderer, within } from '@mui-internal/test-utils';
import Menu from '@mui/material/Menu';
import MenuItem from '@mui/material/MenuItem';
diff --git a/packages/mui-material/test/integration/PopperChildrenLayout.test.js b/packages/mui-material/test/integration/PopperChildrenLayout.test.js
index 9dca88ea85f718..a9c6bfad6a270c 100644
--- a/packages/mui-material/test/integration/PopperChildrenLayout.test.js
+++ b/packages/mui-material/test/integration/PopperChildrenLayout.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import Collapse from '@mui/material/Collapse';
import Fade from '@mui/material/Fade';
import Grow from '@mui/material/Grow';
diff --git a/packages/mui-material/test/integration/Select.test.js b/packages/mui-material/test/integration/Select.test.js
index 5c84179b168a7e..446fbb4671b2fc 100644
--- a/packages/mui-material/test/integration/Select.test.js
+++ b/packages/mui-material/test/integration/Select.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { act, createRenderer, fireEvent } from 'test/utils';
+import { act, createRenderer, fireEvent } from '@mui-internal/test-utils';
import MenuItem from '@mui/material/MenuItem';
import Select from '@mui/material/Select';
import Dialog from '@mui/material/Dialog';
diff --git a/packages/mui-material/test/integration/TableCell.test.js b/packages/mui-material/test/integration/TableCell.test.js
index 6d1007ed6cceb7..17438f10e3a913 100644
--- a/packages/mui-material/test/integration/TableCell.test.js
+++ b/packages/mui-material/test/integration/TableCell.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import TableCell, { tableCellClasses as classes } from '@mui/material/TableCell';
import Table from '@mui/material/Table';
import TableFooter from '@mui/material/TableFooter';
diff --git a/packages/mui-material/test/integration/TableRow.test.js b/packages/mui-material/test/integration/TableRow.test.js
index 83f9dc6c9c4a75..dafad88ead09cf 100644
--- a/packages/mui-material/test/integration/TableRow.test.js
+++ b/packages/mui-material/test/integration/TableRow.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import TableFooter from '@mui/material/TableFooter';
import TableHead from '@mui/material/TableHead';
import TableRow, { tableRowClasses as classes } from '@mui/material/TableRow';
diff --git a/packages/mui-private-theming/package.json b/packages/mui-private-theming/package.json
index 3f70281417298b..e71b691c577266 100644
--- a/packages/mui-private-theming/package.json
+++ b/packages/mui-private-theming/package.json
@@ -46,11 +46,11 @@
"@mui/material": "^5.14.10",
"@mui/styles": "^5.14.10",
"@mui/types": "^7.2.4",
+ "@mui-internal/test-utils": "^1.0.0",
"@types/chai": "^4.3.6",
"@types/react": "^18.2.21",
"chai": "^4.3.8",
- "react": "^18.2.0",
- "test": "^5.0.0"
+ "react": "^18.2.0"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0",
diff --git a/packages/mui-private-theming/src/ThemeProvider/ThemeProvider.test.js b/packages/mui-private-theming/src/ThemeProvider/ThemeProvider.test.js
index de0fe0cb55e789..2ad69ef6db96d8 100644
--- a/packages/mui-private-theming/src/ThemeProvider/ThemeProvider.test.js
+++ b/packages/mui-private-theming/src/ThemeProvider/ThemeProvider.test.js
@@ -1,6 +1,10 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, RenderCounter, strictModeDoubleLoggingSuppressed } from 'test/utils';
+import {
+ createRenderer,
+ RenderCounter,
+ strictModeDoubleLoggingSuppressed,
+} from '@mui-internal/test-utils';
import useTheme from '../useTheme';
import ThemeProvider from './ThemeProvider';
diff --git a/packages/mui-private-theming/src/useTheme/useTheme.test.js b/packages/mui-private-theming/src/useTheme/useTheme.test.js
index 27ef06f7615e5c..77c28631d0aa8e 100644
--- a/packages/mui-private-theming/src/useTheme/useTheme.test.js
+++ b/packages/mui-private-theming/src/useTheme/useTheme.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import useTheme from './useTheme';
import ThemeProvider from '../ThemeProvider';
diff --git a/packages/mui-styled-engine-sc/package.json b/packages/mui-styled-engine-sc/package.json
index 5dff03ced01dd3..62b0126d565b4c 100644
--- a/packages/mui-styled-engine-sc/package.json
+++ b/packages/mui-styled-engine-sc/package.json
@@ -43,13 +43,13 @@
"prop-types": "^15.8.1"
},
"devDependencies": {
+ "@mui-internal/test-utils": "^1.0.0",
"@types/chai": "^4.3.6",
"@types/react": "^18.2.21",
"@types/styled-components": "^5.1.27",
"chai": "^4.3.8",
"react": "^18.2.0",
- "styled-components": "^5.3.11",
- "test": "^5.0.0"
+ "styled-components": "^5.3.11"
},
"peerDependencies": {
"@types/styled-components": "^5.1.14",
diff --git a/packages/mui-styled-engine-sc/src/GlobalStyles/GlobalStyles.test.js b/packages/mui-styled-engine-sc/src/GlobalStyles/GlobalStyles.test.js
index d656f98c4bbc0b..a5c48b4d8cfd44 100644
--- a/packages/mui-styled-engine-sc/src/GlobalStyles/GlobalStyles.test.js
+++ b/packages/mui-styled-engine-sc/src/GlobalStyles/GlobalStyles.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { ThemeProvider } from 'styled-components';
import styled from '..';
import GlobalStyles from './GlobalStyles';
diff --git a/packages/mui-styled-engine-sc/src/styled.test.js b/packages/mui-styled-engine-sc/src/styled.test.js
index 959fb6a518d91b..22d16ba1fe1bf7 100644
--- a/packages/mui-styled-engine-sc/src/styled.test.js
+++ b/packages/mui-styled-engine-sc/src/styled.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import styled from '@mui/styled-engine-sc';
describe('styled', () => {
diff --git a/packages/mui-styled-engine/package.json b/packages/mui-styled-engine/package.json
index fea8ebfc87b44e..d6cc1b96383028 100644
--- a/packages/mui-styled-engine/package.json
+++ b/packages/mui-styled-engine/package.json
@@ -46,11 +46,11 @@
"devDependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
+ "@mui-internal/test-utils": "^1.0.0",
"@types/chai": "^4.3.6",
"@types/react": "^18.2.21",
"chai": "^4.3.8",
- "react": "^18.2.0",
- "test": "^5.0.0"
+ "react": "^18.2.0"
},
"peerDependencies": {
"@emotion/react": "^11.4.1",
diff --git a/packages/mui-styled-engine/src/GlobalStyles/GlobalStyles.test.js b/packages/mui-styled-engine/src/GlobalStyles/GlobalStyles.test.js
index 16ab9cb96c92ba..8febe0855b8ded 100644
--- a/packages/mui-styled-engine/src/GlobalStyles/GlobalStyles.test.js
+++ b/packages/mui-styled-engine/src/GlobalStyles/GlobalStyles.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { ThemeProvider } from '@emotion/react';
import styled from '..';
import GlobalStyles from './GlobalStyles';
diff --git a/packages/mui-styles/package.json b/packages/mui-styles/package.json
index 62f8e39ed49943..70d0b9b68e4900 100644
--- a/packages/mui-styles/package.json
+++ b/packages/mui-styles/package.json
@@ -59,6 +59,7 @@
"devDependencies": {
"@mui/joy": "5.0.0-beta.7",
"@mui/material": "^5.14.10",
+ "@mui-internal/test-utils": "^1.0.0",
"@types/chai": "^4.3.6",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
@@ -66,8 +67,7 @@
"chai": "^4.3.8",
"react": "^18.2.0",
"react-dom": "^18.2.0",
- "sinon": "^15.2.0",
- "test": "^5.0.0"
+ "sinon": "^15.2.0"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0",
diff --git a/packages/mui-styles/src/StylesProvider/StylesProvider.test.js b/packages/mui-styles/src/StylesProvider/StylesProvider.test.js
index b278c8a1855901..0c9945949a95ce 100644
--- a/packages/mui-styles/src/StylesProvider/StylesProvider.test.js
+++ b/packages/mui-styles/src/StylesProvider/StylesProvider.test.js
@@ -2,7 +2,7 @@ import * as React from 'react';
import * as ReactDOMServer from 'react-dom/server';
import { expect } from 'chai';
import { create, SheetsRegistry } from 'jss';
-import { createMount, strictModeDoubleLoggingSuppressed } from 'test/utils';
+import { createMount, strictModeDoubleLoggingSuppressed } from '@mui-internal/test-utils';
import StylesProvider, { StylesContext } from './StylesProvider';
import makeStyles from '../makeStyles';
import createGenerateClassName from '../createGenerateClassName';
diff --git a/packages/mui-styles/src/ThemeProvider/ThemeProvider.test.js b/packages/mui-styles/src/ThemeProvider/ThemeProvider.test.js
index 8cbf9005935046..862ed5ffc1de7f 100644
--- a/packages/mui-styles/src/ThemeProvider/ThemeProvider.test.js
+++ b/packages/mui-styles/src/ThemeProvider/ThemeProvider.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import ThemeProvider from '@mui/private-theming/ThemeProvider';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import makeStyles from '../makeStyles';
describe('ThemeProvider', () => {
diff --git a/packages/mui-styles/src/makeStyles/makeStyles.test.js b/packages/mui-styles/src/makeStyles/makeStyles.test.js
index 4e944c9220457d..7cddc8825c46d3 100644
--- a/packages/mui-styles/src/makeStyles/makeStyles.test.js
+++ b/packages/mui-styles/src/makeStyles/makeStyles.test.js
@@ -3,7 +3,7 @@ import * as React from 'react';
import PropTypes from 'prop-types';
import { SheetsRegistry } from 'jss';
import { act } from 'react-dom/test-utils';
-import { createMount } from 'test/utils';
+import { createMount } from '@mui-internal/test-utils';
import { createTheme } from '@mui/material/styles';
import createGenerateClassName from '../createGenerateClassName';
import makeStyles from './makeStyles';
diff --git a/packages/mui-styles/src/styled/styled.test.js b/packages/mui-styles/src/styled/styled.test.js
index ba90b28075d43d..ab34d9c4406612 100644
--- a/packages/mui-styles/src/styled/styled.test.js
+++ b/packages/mui-styles/src/styled/styled.test.js
@@ -2,7 +2,7 @@ import * as React from 'react';
import { expect } from 'chai';
import PropTypes from 'prop-types';
import { SheetsRegistry } from 'jss';
-import { createRenderer, screen } from 'test/utils';
+import { createRenderer, screen } from '@mui-internal/test-utils';
import { createGenerateClassName } from '@mui/styles';
import styled from './styled';
import StylesProvider from '../StylesProvider';
diff --git a/packages/mui-styles/src/useThemeVariants/useThemeVariants.test.js b/packages/mui-styles/src/useThemeVariants/useThemeVariants.test.js
index 14fd15850a9d0c..5773f098072cc2 100644
--- a/packages/mui-styles/src/useThemeVariants/useThemeVariants.test.js
+++ b/packages/mui-styles/src/useThemeVariants/useThemeVariants.test.js
@@ -1,6 +1,10 @@
import { expect } from 'chai';
import * as React from 'react';
-import { createRenderer, screen, strictModeDoubleLoggingSuppressed } from 'test/utils';
+import {
+ createRenderer,
+ screen,
+ strictModeDoubleLoggingSuppressed,
+} from '@mui-internal/test-utils';
import { createTheme } from '@mui/material/styles';
import ThemeProvider from '../ThemeProvider';
import useThemeVariants from './useThemeVariants';
diff --git a/packages/mui-styles/src/withStyles/withStyles.test.js b/packages/mui-styles/src/withStyles/withStyles.test.js
index 7dd4d0f8dc6a70..f739276ae56d0d 100644
--- a/packages/mui-styles/src/withStyles/withStyles.test.js
+++ b/packages/mui-styles/src/withStyles/withStyles.test.js
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import { stub } from 'sinon';
import { SheetsRegistry } from 'jss';
import Input from '@mui/material/Input';
-import { createRenderer, screen } from 'test/utils';
+import { createRenderer, screen } from '@mui-internal/test-utils';
import { isMuiElement } from '@mui/material/utils';
import { createTheme } from '@mui/material/styles';
import StylesProvider from '../StylesProvider';
diff --git a/packages/mui-styles/src/withTheme/withTheme.test.js b/packages/mui-styles/src/withTheme/withTheme.test.js
index 3f37b145a52713..44a200075daf2d 100644
--- a/packages/mui-styles/src/withTheme/withTheme.test.js
+++ b/packages/mui-styles/src/withTheme/withTheme.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import Input from '@mui/material/Input';
import { isMuiElement } from '@mui/material/utils';
import PropTypes from 'prop-types';
diff --git a/packages/mui-styles/test/theme-scoping.test.tsx b/packages/mui-styles/test/theme-scoping.test.tsx
index 66b747b7baba57..36338e944fdaf7 100644
--- a/packages/mui-styles/test/theme-scoping.test.tsx
+++ b/packages/mui-styles/test/theme-scoping.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import * as material from '@mui/material/styles';
import * as joy from '@mui/joy/styles';
import { makeStyles } from '@mui/styles';
diff --git a/packages/mui-system/package.json b/packages/mui-system/package.json
index 2921ffe31ce1c8..996d2c14e6ed35 100644
--- a/packages/mui-system/package.json
+++ b/packages/mui-system/package.json
@@ -55,6 +55,7 @@
"@mui/joy": "5.0.0-beta.7",
"@mui/material": "^5.14.10",
"@mui/material-next": "6.0.0-alpha.102",
+ "@mui-internal/test-utils": "^1.0.0",
"@types/chai": "^4.3.6",
"@types/prop-types": "^15.7.5",
"@types/react": "^18.2.21",
@@ -65,8 +66,7 @@
"lodash": "^4.17.21",
"react": "^18.2.0",
"sinon": "^15.2.0",
- "styled-components": "^5.3.11",
- "test": "^5.0.0"
+ "styled-components": "^5.3.11"
},
"peerDependencies": {
"@emotion/react": "^11.5.0",
diff --git a/packages/mui-system/src/Box/Box.test.js b/packages/mui-system/src/Box/Box.test.js
index 0b1808815bd89e..c90d86f4aa74a8 100644
--- a/packages/mui-system/src/Box/Box.test.js
+++ b/packages/mui-system/src/Box/Box.test.js
@@ -1,7 +1,7 @@
/* eslint-disable material-ui/no-empty-box */
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import { Box, createTheme, ThemeProvider } from '@mui/system';
describe('', () => {
diff --git a/packages/mui-system/src/Container/Container.test.js b/packages/mui-system/src/Container/Container.test.js
index a9ec4a3880bb7f..66b70b2dca95b3 100644
--- a/packages/mui-system/src/Container/Container.test.js
+++ b/packages/mui-system/src/Container/Container.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer } from 'test/utils';
+import { describeConformance, createRenderer } from '@mui-internal/test-utils';
import { Container, containerClasses as classes } from '@mui/system';
describe('', () => {
diff --git a/packages/mui-system/src/GlobalStyles/GlobalStyles.test.tsx b/packages/mui-system/src/GlobalStyles/GlobalStyles.test.tsx
index fd278973209831..17178436fcdee9 100644
--- a/packages/mui-system/src/GlobalStyles/GlobalStyles.test.tsx
+++ b/packages/mui-system/src/GlobalStyles/GlobalStyles.test.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { GlobalStyles } from '@mui/system';
describe('', () => {
diff --git a/packages/mui-system/src/Stack/Stack.test.js b/packages/mui-system/src/Stack/Stack.test.js
index 355c90e820e959..7e190c6d1703f2 100644
--- a/packages/mui-system/src/Stack/Stack.test.js
+++ b/packages/mui-system/src/Stack/Stack.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, describeConformance } from 'test/utils';
+import { createRenderer, describeConformance } from '@mui-internal/test-utils';
import Stack from '@mui/system/Stack';
import { createTheme } from '@mui/system';
import { style } from './createStack';
diff --git a/packages/mui-system/src/ThemeProvider/ThemeProvider.test.js b/packages/mui-system/src/ThemeProvider/ThemeProvider.test.js
index ccddf5420e9c6e..febe6050490f54 100644
--- a/packages/mui-system/src/ThemeProvider/ThemeProvider.test.js
+++ b/packages/mui-system/src/ThemeProvider/ThemeProvider.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { useTheme as usePrivateTheme } from '@mui/private-theming';
import { ThemeContext } from '@mui/styled-engine';
import { ThemeProvider } from '@mui/system';
diff --git a/packages/mui-system/src/Unstable_Grid/Grid.test.js b/packages/mui-system/src/Unstable_Grid/Grid.test.js
index b9f706a530362b..6e6d9094a9cd97 100644
--- a/packages/mui-system/src/Unstable_Grid/Grid.test.js
+++ b/packages/mui-system/src/Unstable_Grid/Grid.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { describeConformance, createRenderer, screen } from 'test/utils';
+import { describeConformance, createRenderer, screen } from '@mui-internal/test-utils';
import { ThemeProvider, createTheme } from '@mui/system';
import Grid, { gridClasses as classes } from '@mui/system/Unstable_Grid';
diff --git a/packages/mui-system/src/createBox.test.js b/packages/mui-system/src/createBox.test.js
index 4236ac39da8b6d..12449e27112b5a 100644
--- a/packages/mui-system/src/createBox.test.js
+++ b/packages/mui-system/src/createBox.test.js
@@ -2,7 +2,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { createBox, ThemeProvider } from '@mui/system';
describe('createBox', () => {
diff --git a/packages/mui-system/src/createStyled.test.js b/packages/mui-system/src/createStyled.test.js
index 87f57efe543645..c03c503374db88 100644
--- a/packages/mui-system/src/createStyled.test.js
+++ b/packages/mui-system/src/createStyled.test.js
@@ -2,7 +2,7 @@ import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
import { ThemeProvider, createTheme } from '@mui/material/styles';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import createStyled from './createStyled';
describe('createStyled', () => {
diff --git a/packages/mui-system/src/createTheme/createTheme.test.js b/packages/mui-system/src/createTheme/createTheme.test.js
index c86c8911ccae13..9393292b1eb666 100644
--- a/packages/mui-system/src/createTheme/createTheme.test.js
+++ b/packages/mui-system/src/createTheme/createTheme.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { createTheme, styled, ThemeProvider } from '@mui/system';
describe('createTheme', () => {
diff --git a/packages/mui-system/src/cssVars/createCssVarsProvider.test.js b/packages/mui-system/src/cssVars/createCssVarsProvider.test.js
index c51e7207031427..85f2c04d76b637 100644
--- a/packages/mui-system/src/cssVars/createCssVarsProvider.test.js
+++ b/packages/mui-system/src/cssVars/createCssVarsProvider.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer, screen, fireEvent } from 'test/utils';
+import { createRenderer, screen, fireEvent } from '@mui-internal/test-utils';
import createCssVarsTheme from './createCssVarsTheme';
import createCssVarsProvider, { DISABLE_CSS_TRANSITION } from './createCssVarsProvider';
import { DEFAULT_ATTRIBUTE, DEFAULT_MODE_STORAGE_KEY } from './getInitColorSchemeScript';
diff --git a/packages/mui-system/src/cssVars/getInitColorSchemeScript.test.js b/packages/mui-system/src/cssVars/getInitColorSchemeScript.test.js
index 28e8ba980a3dca..8340db5c31bbda 100644
--- a/packages/mui-system/src/cssVars/getInitColorSchemeScript.test.js
+++ b/packages/mui-system/src/cssVars/getInitColorSchemeScript.test.js
@@ -1,6 +1,6 @@
/* eslint-disable no-eval */
import { expect } from 'chai';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import getInitColorSchemeScript, {
DEFAULT_ATTRIBUTE,
DEFAULT_MODE_STORAGE_KEY,
diff --git a/packages/mui-system/src/cssVars/useCurrentColorScheme.test.js b/packages/mui-system/src/cssVars/useCurrentColorScheme.test.js
index 92ca222b75d294..ee1e91e56188d0 100644
--- a/packages/mui-system/src/cssVars/useCurrentColorScheme.test.js
+++ b/packages/mui-system/src/cssVars/useCurrentColorScheme.test.js
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer, fireEvent, act, screen } from 'test/utils';
+import { createRenderer, fireEvent, act, screen } from '@mui-internal/test-utils';
import {
DEFAULT_MODE_STORAGE_KEY,
DEFAULT_COLOR_SCHEME_STORAGE_KEY,
diff --git a/packages/mui-system/src/styled.test.js b/packages/mui-system/src/styled.test.js
index 995c4a7fabe95c..a2d5b82a2d8fc1 100644
--- a/packages/mui-system/src/styled.test.js
+++ b/packages/mui-system/src/styled.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, screen } from 'test/utils';
+import { createRenderer, screen } from '@mui-internal/test-utils';
import { styled, createTheme, ThemeProvider } from '@mui/system';
describe('styled', () => {
diff --git a/packages/mui-system/test/integration/theme-scoping.test.tsx b/packages/mui-system/test/integration/theme-scoping.test.tsx
index b1b6384850c730..bc3e1d3a69295d 100644
--- a/packages/mui-system/test/integration/theme-scoping.test.tsx
+++ b/packages/mui-system/test/integration/theme-scoping.test.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
-import { createRenderer } from 'test/utils';
+import { createRenderer } from '@mui-internal/test-utils';
import { ThemeContext } from '@mui/styled-engine';
import * as material from '@mui/material';
import * as joy from '@mui/joy';
diff --git a/packages/mui-utils/package.json b/packages/mui-utils/package.json
index 95263976f2126b..94a3fe7261bf20 100644
--- a/packages/mui-utils/package.json
+++ b/packages/mui-utils/package.json
@@ -47,6 +47,7 @@
"devDependencies": {
"@babel/helper-module-imports": "^7.22.15",
"@mui/types": "^7.2.4",
+ "@mui-internal/test-utils": "^1.0.0",
"@types/babel-plugin-macros": "^3.1.1",
"@types/chai": "^4.3.6",
"@types/mocha": "^10.0.1",
@@ -60,8 +61,7 @@
"chai": "^4.3.8",
"react": "^18.2.0",
"react-dom": "^18.2.0",
- "sinon": "^15.2.0",
- "test": "^5.0.0"
+ "sinon": "^15.2.0"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0",
diff --git a/packages/mui-utils/src/useControlled/useControlled.test.js b/packages/mui-utils/src/useControlled/useControlled.test.js
index 0da2ceb0eddeb7..7319349f7343bb 100644
--- a/packages/mui-utils/src/useControlled/useControlled.test.js
+++ b/packages/mui-utils/src/useControlled/useControlled.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { act, createRenderer } from 'test/utils';
+import { act, createRenderer } from '@mui-internal/test-utils';
import useControlled from './useControlled';
const TestComponent = ({ value: valueProp, defaultValue, children }) => {
diff --git a/packages/mui-utils/src/useForkRef/useForkRef.test.js b/packages/mui-utils/src/useForkRef/useForkRef.test.js
index c15179247a409b..57a7290a635b48 100644
--- a/packages/mui-utils/src/useForkRef/useForkRef.test.js
+++ b/packages/mui-utils/src/useForkRef/useForkRef.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, screen } from 'test/utils';
+import { createRenderer, screen } from '@mui-internal/test-utils';
import useForkRef from './useForkRef';
describe('useForkRef', () => {
diff --git a/packages/mui-utils/src/useId/useId.test.js b/packages/mui-utils/src/useId/useId.test.js
index ec238bdfaf932b..2d74f5eb00008a 100644
--- a/packages/mui-utils/src/useId/useId.test.js
+++ b/packages/mui-utils/src/useId/useId.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createRenderer, screen } from 'test/utils';
+import { createRenderer, screen } from '@mui-internal/test-utils';
import useId from './useId';
describe('useId', () => {
diff --git a/packages/mui-utils/src/useIsFocusVisible.test.js b/packages/mui-utils/src/useIsFocusVisible.test.js
index 52974ed1e1f941..d8b4751b3495e1 100644
--- a/packages/mui-utils/src/useIsFocusVisible.test.js
+++ b/packages/mui-utils/src/useIsFocusVisible.test.js
@@ -7,7 +7,7 @@ import {
focusVisible,
simulatePointerDevice,
programmaticFocusTriggersFocusVisible,
-} from 'test/utils';
+} from '@mui-internal/test-utils';
import useIsFocusVisible, { teardown as teardownFocusVisible } from './useIsFocusVisible';
import useForkRef from './useForkRef';
diff --git a/packages/mui-utils/tsconfig.json b/packages/mui-utils/tsconfig.json
index e7d248754c9c1c..88c4875ab6e81e 100644
--- a/packages/mui-utils/tsconfig.json
+++ b/packages/mui-utils/tsconfig.json
@@ -3,5 +3,5 @@
"compilerOptions": {
"types": ["react", "mocha", "node"]
},
- "include": ["src/**/*", "../../test/utils/initMatchers.ts"]
+ "include": ["src/**/*"]
}
diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json
new file mode 100644
index 00000000000000..77b5a42aa405bc
--- /dev/null
+++ b/packages/test-utils/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "@mui-internal/test-utils",
+ "version": "1.0.0",
+ "private": true,
+ "scripts": {
+ "typescript": "tsc -p tsconfig.json"
+ },
+ "main": "src/index.ts",
+ "exports": {
+ ".": "./src/index.ts",
+ "./init": "./src/init.js",
+ "./initMatchers": "./src/initMatchers.ts",
+ "./initPlaywrightMatchers": "./src/initPlaywrightMatchers.ts",
+ "./KarmaReporterReactProfiler": "./src/KarmaReporterReactProfiler.js",
+ "./setupBabel": "./src/setupBabel.js",
+ "./setupBabelPlaywright": "./src/setupBabelPlaywright.js",
+ "./setupJSDOM": "./src/setupJSDOM.js",
+ "./setupKarma": "./src/setupKarma.js"
+ },
+ "dependencies": {
+ "@babel/plugin-transform-modules-commonjs": "^7.22.15",
+ "@babel/preset-typescript": "^7.22.15",
+ "@babel/register": "^7.22.15",
+ "@emotion/cache": "^11.11.0",
+ "@emotion/react": "^11.11.1",
+ "@mnajdova/enzyme-adapter-react-18": "^0.2.0",
+ "@testing-library/dom": "^9.3.1",
+ "@testing-library/react": "^14.0.0",
+ "chai": "^4.3.7",
+ "chai-dom": "^1.11.0",
+ "dom-accessibility-api": "^0.6.1",
+ "enzyme": "^3.11.0",
+ "format-util": "^1.0.5",
+ "fs-extra": "^11.1.1",
+ "jsdom": "^22.1.0",
+ "lodash": "^4.17.21",
+ "mocha": "^10.2.0",
+ "playwright": "^1.37.1",
+ "prop-types": "^15.8.1",
+ "react-test-renderer": "^18.2.0",
+ "sinon": "^15.2.0"
+ },
+ "devDependencies": {
+ "@types/chai": "^4.3.5",
+ "@types/chai-dom": "^1.11.1",
+ "@types/enzyme": "^3.10.13",
+ "@types/format-util": "^1.0.2",
+ "@types/prop-types": "^15.7.5",
+ "@types/react": "^18.2.21",
+ "@types/react-dom": "^18.2.7",
+ "@types/react-test-renderer": "^18.0.1",
+ "@types/sinon": "^10.0.16",
+ "typescript": "^5.1.6"
+ },
+ "peerDependencies": {
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0"
+ }
+}
diff --git a/test/utils/KarmaReporterReactProfiler.js b/packages/test-utils/src/KarmaReporterReactProfiler.js
similarity index 100%
rename from test/utils/KarmaReporterReactProfiler.js
rename to packages/test-utils/src/KarmaReporterReactProfiler.js
diff --git a/test/utils/components.tsx b/packages/test-utils/src/components.tsx
similarity index 100%
rename from test/utils/components.tsx
rename to packages/test-utils/src/components.tsx
diff --git a/test/utils/createDOM.d.ts b/packages/test-utils/src/createDOM.d.ts
similarity index 100%
rename from test/utils/createDOM.d.ts
rename to packages/test-utils/src/createDOM.d.ts
diff --git a/test/utils/createDOM.js b/packages/test-utils/src/createDOM.js
similarity index 100%
rename from test/utils/createDOM.js
rename to packages/test-utils/src/createDOM.js
diff --git a/test/utils/createDescribe.ts b/packages/test-utils/src/createDescribe.ts
similarity index 100%
rename from test/utils/createDescribe.ts
rename to packages/test-utils/src/createDescribe.ts
diff --git a/test/utils/createMount.tsx b/packages/test-utils/src/createMount.tsx
similarity index 100%
rename from test/utils/createMount.tsx
rename to packages/test-utils/src/createMount.tsx
diff --git a/test/utils/createRenderer.test.js b/packages/test-utils/src/createRenderer.test.js
similarity index 100%
rename from test/utils/createRenderer.test.js
rename to packages/test-utils/src/createRenderer.test.js
diff --git a/test/utils/createRenderer.tsx b/packages/test-utils/src/createRenderer.tsx
similarity index 100%
rename from test/utils/createRenderer.tsx
rename to packages/test-utils/src/createRenderer.tsx
diff --git a/test/utils/describeConformance.tsx b/packages/test-utils/src/describeConformance.tsx
similarity index 100%
rename from test/utils/describeConformance.tsx
rename to packages/test-utils/src/describeConformance.tsx
diff --git a/test/utils/describeConformanceUnstyled.tsx b/packages/test-utils/src/describeConformanceUnstyled.tsx
similarity index 100%
rename from test/utils/describeConformanceUnstyled.tsx
rename to packages/test-utils/src/describeConformanceUnstyled.tsx
diff --git a/test/utils/describeJoyColorInversion.tsx b/packages/test-utils/src/describeJoyColorInversion.tsx
similarity index 100%
rename from test/utils/describeJoyColorInversion.tsx
rename to packages/test-utils/src/describeJoyColorInversion.tsx
diff --git a/test/utils/findOutermostIntrinsic.test.js b/packages/test-utils/src/findOutermostIntrinsic.test.js
similarity index 97%
rename from test/utils/findOutermostIntrinsic.test.js
rename to packages/test-utils/src/findOutermostIntrinsic.test.js
index 1e116d779051a3..f5d9b21e4c6cb6 100644
--- a/test/utils/findOutermostIntrinsic.test.js
+++ b/packages/test-utils/src/findOutermostIntrinsic.test.js
@@ -1,6 +1,6 @@
import * as React from 'react';
import { expect } from 'chai';
-import { createMount } from 'test/utils';
+import createMount from './createMount';
import findOutermostIntrinsic from './findOutermostIntrinsic';
describe('findOutermostIntrinsic', () => {
diff --git a/test/utils/findOutermostIntrinsic.ts b/packages/test-utils/src/findOutermostIntrinsic.ts
similarity index 100%
rename from test/utils/findOutermostIntrinsic.ts
rename to packages/test-utils/src/findOutermostIntrinsic.ts
diff --git a/test/utils/fireDiscreteEvent.ts b/packages/test-utils/src/fireDiscreteEvent.ts
similarity index 100%
rename from test/utils/fireDiscreteEvent.ts
rename to packages/test-utils/src/fireDiscreteEvent.ts
diff --git a/test/utils/focusVisible.ts b/packages/test-utils/src/focusVisible.ts
similarity index 100%
rename from test/utils/focusVisible.ts
rename to packages/test-utils/src/focusVisible.ts
diff --git a/test/utils/index.ts b/packages/test-utils/src/index.ts
similarity index 100%
rename from test/utils/index.ts
rename to packages/test-utils/src/index.ts
diff --git a/test/utils/init.js b/packages/test-utils/src/init.js
similarity index 100%
rename from test/utils/init.js
rename to packages/test-utils/src/init.js
diff --git a/test/utils/initMatchers.test.js b/packages/test-utils/src/initMatchers.test.js
similarity index 100%
rename from test/utils/initMatchers.test.js
rename to packages/test-utils/src/initMatchers.test.js
diff --git a/test/utils/initMatchers.ts b/packages/test-utils/src/initMatchers.ts
similarity index 100%
rename from test/utils/initMatchers.ts
rename to packages/test-utils/src/initMatchers.ts
diff --git a/test/utils/initPlaywrightMatchers.ts b/packages/test-utils/src/initPlaywrightMatchers.ts
similarity index 100%
rename from test/utils/initPlaywrightMatchers.ts
rename to packages/test-utils/src/initPlaywrightMatchers.ts
diff --git a/test/utils/mochaHooks.js b/packages/test-utils/src/mochaHooks.js
similarity index 100%
rename from test/utils/mochaHooks.js
rename to packages/test-utils/src/mochaHooks.js
diff --git a/test/utils/mochaHooks.test.js b/packages/test-utils/src/mochaHooks.test.js
similarity index 100%
rename from test/utils/mochaHooks.test.js
rename to packages/test-utils/src/mochaHooks.test.js
diff --git a/test/utils/setup.js b/packages/test-utils/src/setup.js
similarity index 100%
rename from test/utils/setup.js
rename to packages/test-utils/src/setup.js
diff --git a/test/utils/setupBabel.js b/packages/test-utils/src/setupBabel.js
similarity index 100%
rename from test/utils/setupBabel.js
rename to packages/test-utils/src/setupBabel.js
diff --git a/test/utils/setupBabelPlaywright.js b/packages/test-utils/src/setupBabelPlaywright.js
similarity index 100%
rename from test/utils/setupBabelPlaywright.js
rename to packages/test-utils/src/setupBabelPlaywright.js
diff --git a/test/utils/setupJSDOM.js b/packages/test-utils/src/setupJSDOM.js
similarity index 100%
rename from test/utils/setupJSDOM.js
rename to packages/test-utils/src/setupJSDOM.js
diff --git a/test/utils/setupKarma.js b/packages/test-utils/src/setupKarma.js
similarity index 100%
rename from test/utils/setupKarma.js
rename to packages/test-utils/src/setupKarma.js
diff --git a/test/utils/until.js b/packages/test-utils/src/until.js
similarity index 100%
rename from test/utils/until.js
rename to packages/test-utils/src/until.js
diff --git a/test/utils/until.test.js b/packages/test-utils/src/until.test.js
similarity index 100%
rename from test/utils/until.test.js
rename to packages/test-utils/src/until.test.js
diff --git a/test/utils/userEvent.ts b/packages/test-utils/src/userEvent.ts
similarity index 100%
rename from test/utils/userEvent.ts
rename to packages/test-utils/src/userEvent.ts
diff --git a/packages/test-utils/tsconfig.json b/packages/test-utils/tsconfig.json
new file mode 100644
index 00000000000000..9a0c365b532095
--- /dev/null
+++ b/packages/test-utils/tsconfig.json
@@ -0,0 +1,12 @@
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "allowJs": true,
+ "noEmit": true,
+ "noUnusedLocals": true,
+ "skipLibCheck": true,
+ "esModuleInterop": true
+ },
+ "include": ["src/**/*"],
+ "exclude": ["node_modules"]
+}
diff --git a/test/README.md b/test/README.md
index 7fd8d0c11e063c..14b7b929336bce 100644
--- a/test/README.md
+++ b/test/README.md
@@ -22,7 +22,7 @@ Thanks for writing tests! Here's a quick run-down on our current setup.
## Writing tests
-For all unit tests, please use the return value from `test/utils/createRenderer`.
+For all unit tests, please use the return value from `@mui-internal/test-utils/createRenderer`.
It prepares the test suite and returns a function with the same interface as
[`render` from `@testing-library/react`](https://testing-library.com/docs/react-testing-library/api#render).
diff --git a/test/e2e/.mocharc.js b/test/e2e/.mocharc.js
index 081b97d43754d5..92386403490464 100644
--- a/test/e2e/.mocharc.js
+++ b/test/e2e/.mocharc.js
@@ -4,5 +4,5 @@ module.exports = {
slow: 500,
timeout: (process.env.CIRCLECI === 'true' ? 4 : 2) * 1000, // Circle CI has low-performance CPUs.
reporter: 'dot',
- require: [require.resolve('../utils/setupBabelPlaywright')],
+ require: ['@mui-internal/test-utils/setupBabelPlaywright'],
};
diff --git a/test/e2e/index.test.ts b/test/e2e/index.test.ts
index 2014d81fe96f74..a5ceb4f2924b94 100644
--- a/test/e2e/index.test.ts
+++ b/test/e2e/index.test.ts
@@ -7,7 +7,8 @@ import type {
MatcherOptions,
SelectorMatcherOptions,
} from '@testing-library/dom';
-import '../utils/initPlaywrightMatchers';
+import '@mui-internal/test-utils/initMatchers';
+import '@mui-internal/test-utils/initPlaywrightMatchers';
function sleep(duration: number): Promise {
return new Promise((resolve) => {
diff --git a/test/karma.conf.profile.js b/test/karma.conf.profile.js
index b952e5a651d1f4..2d5f7ee2e3939d 100644
--- a/test/karma.conf.profile.js
+++ b/test/karma.conf.profile.js
@@ -39,7 +39,7 @@ module.exports = function setKarmaConfig(config) {
'karma-chrome-launcher',
'karma-sourcemap-loader',
'karma-webpack',
- require.resolve('./utils/KarmaReporterReactProfiler'),
+ '@mui-internal/test-utils/KarmaReporterReactProfiler',
],
/**
* possible values:
diff --git a/test/karma.tests.js b/test/karma.tests.js
index 4625479c8dea4c..8925bc09cc3bd4 100644
--- a/test/karma.tests.js
+++ b/test/karma.tests.js
@@ -1,5 +1,5 @@
-import './utils/init';
-import './utils/setupKarma';
+import '@mui-internal/test-utils/init';
+import '@mui-internal/test-utils/setupKarma';
const materialIntegrationContext = require.context(
'../packages/mui-material/test/integration',
diff --git a/test/package.json b/test/package.json
index 2fe34b807a96c6..2bec94b730eaea 100644
--- a/test/package.json
+++ b/test/package.json
@@ -1,18 +1,14 @@
{
- "name": "test",
+ "name": "@mui-internal/tests",
"version": "5.0.0",
"private": true,
"scripts": {
"typescript": "tsc -p tsconfig.json"
},
"devDependencies": {
- "@babel/plugin-transform-modules-commonjs": "^7.22.15",
- "@babel/preset-typescript": "^7.22.15",
- "@babel/register": "^7.22.15",
"@babel/runtime": "^7.22.15",
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.1",
- "@mnajdova/enzyme-adapter-react-18": "^0.2.0",
"@mui/base": "5.0.0-beta.16",
"@mui/icons-material": "^5.14.9",
"@mui/joy": "5.0.0-beta.7",
@@ -20,39 +16,22 @@
"@mui/material": "^5.14.10",
"@mui/material-next": "6.0.0-alpha.102",
"@mui/system": "^5.14.10",
- "@mui/utils": "^5.14.10",
+ "@mui-internal/test-utils": "^1.0.0",
"@playwright/test": "1.37.1",
"@testing-library/dom": "^9.3.1",
- "@testing-library/react": "^14.0.0",
"@types/chai": "^4.3.6",
- "@types/chai-dom": "^1.11.1",
- "@types/enzyme": "^3.10.13",
- "@types/format-util": "^1.0.2",
- "@types/prop-types": "^15.7.5",
"@types/react": "^18.2.21",
- "@types/react-dom": "^18.2.7",
- "@types/react-is": "^18.2.1",
- "@types/react-test-renderer": "^18.0.1",
- "@types/sinon": "^10.0.16",
"chai": "^4.3.8",
- "chai-dom": "^1.11.0",
"docs": "^5.0.0",
- "dom-accessibility-api": "^0.6.1",
- "enzyme": "^3.11.0",
"fast-glob": "^3.3.1",
- "format-util": "^1.0.5",
"fs-extra": "^11.1.1",
"html-webpack-plugin": "^5.5.3",
- "jsdom": "^22.1.0",
"lodash": "^4.17.21",
- "mocha": "^10.2.0",
"playwright": "^1.37.1",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
- "react-is": "^18.2.0",
"react-router-dom": "^6.15.0",
- "react-test-renderer": "^18.2.0",
"sinon": "^15.2.0",
"styled-components": "6.0.7",
"stylis": "4.2.0",
diff --git a/test/regressions/.mocharc.js b/test/regressions/.mocharc.js
index 2e476a33d3ddd1..66b9e6bc4905df 100644
--- a/test/regressions/.mocharc.js
+++ b/test/regressions/.mocharc.js
@@ -3,5 +3,5 @@ module.exports = {
slow: 500,
timeout: (process.env.CIRCLECI === 'true' ? 4 : 2) * 1000, // Circle CI has low-performance CPUs.
reporter: 'dot',
- require: [require.resolve('../utils/setupBabelPlaywright')],
+ require: ['@mui-internal/test-utils/setupBabelPlaywright'],
};
diff --git a/test/tsconfig.json b/test/tsconfig.json
index 798f9d363f0e6d..b7cc8d29136617 100644
--- a/test/tsconfig.json
+++ b/test/tsconfig.json
@@ -1,12 +1,13 @@
{
"extends": "../tsconfig.json",
- "include": ["e2e/**/*", "regressions/**/*", "utils/**/*"],
"compilerOptions": {
"allowJs": true,
- "noEmit": true,
"noUnusedLocals": true,
"skipLibCheck": true,
- "esModuleInterop": true
+ "esModuleInterop": true,
+ "moduleResolution": "node16",
+ "types": ["mocha"]
},
- "exclude": ["node_modules"]
+ "include": ["e2e/**/*", "regressions/**/*"],
+ "exclude": ["node_modules", "*/build"]
}
diff --git a/tsconfig.json b/tsconfig.json
index f18dfa4f29d3ca..2c5723bbbe1591 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -44,7 +44,6 @@
"@mui/zero-runtime/*": ["./packages/zero-runtime/src/*"],
"@mui/zero-tag-processor/*": ["./packages/zero-tag-processor/src/*"],
"@mui/zero-vite-plugin/*": ["./packages/zero-vite-plugin/src/*"],
- "test/*": ["./test/*"],
"typescript-to-proptypes": ["./packages/typescript-to-proptypes/src"]
},
// Otherwise we get react-native typings which conflict with dom.lib.
diff --git a/yarn.lock b/yarn.lock
index e3b8e97bb2fdff..c872cf04dff346 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3509,7 +3509,7 @@
dependencies:
"@types/chai" "*"
-"@types/chai@*", "@types/chai@^4.3.6":
+"@types/chai@*", "@types/chai@^4.3.5", "@types/chai@^4.3.6":
version "4.3.6"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.6.tgz#7b489e8baf393d5dd1266fb203ddd4ea941259e6"
integrity sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==
@@ -5705,7 +5705,7 @@ chai-dom@^1.11.0:
resolved "https://registry.yarnpkg.com/chai-dom/-/chai-dom-1.11.0.tgz#aa3af405b3d9b0470d185b17081ed23ca5fdaeb4"
integrity sha512-ZzGlEfk1UhHH5+N0t9bDqstOxPEXmn3EyXvtsok5rfXVDOFDJbHVy12rED6ZwkJAUDs2w7/Da4Hlq2LB63kltg==
-chai@^4.3.8:
+chai@^4.3.7, chai@^4.3.8:
version "4.3.8"
resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.8.tgz#40c59718ad6928da6629c70496fe990b2bb5b17c"
integrity sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ==