From 6679d01eed664b4949d495e2b0221b99a9fde966 Mon Sep 17 00:00:00 2001
From: Jan Potoms <2109932+Janpot@users.noreply.github.com>
Date: Fri, 18 Oct 2024 10:51:00 +0200
Subject: [PATCH] [code-infra] Fix icon builder tests (#44143)
---
package.json | 16 ++++++++--------
.../babel-plugin-minify-errors/package.json | 2 +-
packages-internal/scripts/package.json | 2 +-
packages/api-docs-builder-core/package.json | 2 +-
packages/api-docs-builder/package.json | 2 +-
packages/eslint-plugin-material-ui/package.json | 2 +-
packages/mui-base/package.json | 2 +-
packages/mui-codemod/package.json | 2 +-
packages/mui-icons-material/builder.mjs | 2 +-
.../expected/AccessAlarms.js | 3 ++-
.../expected/AccessAlarmsTwoTone.js | 3 ++-
.../expected/Accessibility.js | 3 ++-
.../material-design-icons/expected/ElevenMp.js | 3 ++-
.../material-design-icons/expected/FiveMp.js | 3 ++-
.../expected/QueueMusicOutlined.js | 3 ++-
.../expected/RecordVoiceOverTwoTone.js | 3 ++-
.../material-design-icons/expected/SixtyFps.js | 3 ++-
.../expected/StarRounded.js | 3 ++-
.../material-design-icons/expected/ThirtyFps.js | 3 ++-
.../expected/TimesOneMobiledata.js | 3 ++-
.../expected/TwentyFourMp.js | 3 ++-
packages/mui-icons-material/package.json | 2 +-
packages/mui-joy/package.json | 2 +-
packages/mui-lab/package.json | 2 +-
packages/mui-material-nextjs/package.json | 2 +-
packages/mui-material-pigment-css/package.json | 2 +-
packages/mui-material/package.json | 2 +-
packages/mui-private-theming/package.json | 2 +-
packages/mui-styled-engine-sc/package.json | 2 +-
packages/mui-styled-engine/package.json | 2 +-
packages/mui-styles/package.json | 2 +-
packages/mui-system/package.json | 2 +-
packages/mui-utils/package.json | 2 +-
33 files changed, 52 insertions(+), 40 deletions(-)
diff --git a/package.json b/package.json
index 6251a3e2da2a96..dffcde3df7d88f 100644
--- a/package.json
+++ b/package.json
@@ -45,7 +45,7 @@
"jsonlint": "node ./scripts/jsonlint.mjs",
"eslint": "eslint . --cache --report-unused-disable-directives --ext .js,.ts,.tsx --max-warnings 0",
"eslint:ci": "eslint . --report-unused-disable-directives --ext .js,.ts,.tsx --max-warnings 0",
- "stylelint": "stylelint --reportInvalidScopeDisables --reportNeedlessDisables \"docs/**/*.{js,ts,tsx}\" --ignore-path .gitignore",
+ "stylelint": "stylelint --reportInvalidScopeDisables --reportNeedlessDisables \"docs/**/*.?(c|m)[jt]s?(x)\" --ignore-path .gitignore",
"markdownlint": "markdownlint-cli2 \"**/*.md\"",
"valelint": "git ls-files | grep -h \".md$\" | xargs vale --filter='.Level==\"error\"'",
"prettier": "pretty-quick --ignore-path .eslintignore --branch master",
@@ -87,16 +87,16 @@
"generate-codeowners": "node scripts/generateCodeowners.mjs",
"canary:release": "tsx ./scripts/canaryRelease.mts",
"nx_test_tc": "node test/cli.js",
- "nx_test_coverage_ci": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=lcov mocha 'packages/**/*.test.{js,ts,tsx}' 'packages-internal/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}'",
- "nx_test_coverage_html": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=html mocha 'packages/**/*.test.{js,ts,tsx}' 'packages-internal/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}'",
- "nx_test_coverage": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=text mocha 'packages/**/*.test.{js,ts,tsx}' 'packages-internal/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}'",
+ "nx_test_coverage_ci": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=lcov mocha 'packages/**/*.test.?(c|m)[jt]s?(x)' 'packages-internal/**/*.test.?(c|m)[jt]s?(x)' 'docs/**/*.test.?(c|m)[jt]s?(x)'",
+ "nx_test_coverage_html": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=html mocha 'packages/**/*.test.?(c|m)[jt]s?(x)' 'packages-internal/**/*.test.?(c|m)[jt]s?(x)' 'docs/**/*.test.?(c|m)[jt]s?(x)'",
+ "nx_test_coverage": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=text mocha 'packages/**/*.test.?(c|m)[jt]s?(x)' 'packages-internal/**/*.test.?(c|m)[jt]s?(x)' 'docs/**/*.test.?(c|m)[jt]s?(x)'",
"nx_test_e2e_build": "webpack --config test/e2e/webpack.config.js",
- "nx_test_e2e_run": "mocha --config test/e2e/.mocharc.js 'test/e2e/**/*.test.{js,ts,tsx}'",
+ "nx_test_e2e_run": "mocha --config test/e2e/.mocharc.js 'test/e2e/**/*.test.?(c|m)[jt]s?(x)'",
"nx_test_karma_profile": "cross-env NODE_ENV=test karma start test/karma.conf.profile.js",
"nx_test_karma": "cross-env NODE_ENV=test karma start test/karma.conf.js",
"nx_test_regressions_run": "mocha --config test/regressions/.mocharc.js --delay 'test/regressions/**/*.test.js'",
"nx_test_regressions_pigment_css_run": "mocha --config apps/pigment-css-vite-app/.mocharc.cjs --delay 'apps/pigment-css-vite-app/**/*.test.js'",
- "nx_test_unit": "cross-env NODE_ENV=test mocha 'packages/**/*.test.{js,ts,tsx}' 'packages-internal/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}'"
+ "nx_test_unit": "cross-env NODE_ENV=test mocha 'packages/**/*.test.?(c|m)[jt]s?(x)' 'packages-internal/**/*.test.?(c|m)[jt]s?(x)' 'docs/**/*.test.?(c|m)[jt]s?(x)'"
},
"dependencies": {
"@googleapis/sheets": "^9.3.1",
@@ -225,10 +225,10 @@
},
"nyc": {
"include": [
- "packages/mui*/src/**/*.{js,ts,tsx}"
+ "packages/mui*/src/**/*.?(c|m)[jt]s?(x)"
],
"exclude": [
- "**/*.test.{js,ts,tsx}",
+ "**/*.test.?(c|m)[jt]s?(x)",
"**/*.test/*"
],
"sourceMap": false,
diff --git a/packages-internal/babel-plugin-minify-errors/package.json b/packages-internal/babel-plugin-minify-errors/package.json
index 266da5629c3512..66dd6758c4b191 100644
--- a/packages-internal/babel-plugin-minify-errors/package.json
+++ b/packages-internal/babel-plugin-minify-errors/package.json
@@ -17,7 +17,7 @@
"url": "https://opencollective.com/mui-org"
},
"scripts": {
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages-internal/babel-plugin-minify-errors/**/*.test.{js,ts,tsx}'"
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages-internal/babel-plugin-minify-errors/**/*.test.?(c|m)[jt]s?(x)'"
},
"dependencies": {
"@babel/helper-module-imports": "^7.25.7"
diff --git a/packages-internal/scripts/package.json b/packages-internal/scripts/package.json
index 635ab44e2182ba..70185303e358f2 100644
--- a/packages-internal/scripts/package.json
+++ b/packages-internal/scripts/package.json
@@ -21,7 +21,7 @@
"build": "tsc --build tsconfig.json",
"release:publish": "pnpm build && pnpm publish --tag latest",
"release:publish:dry-run": "pnpm build && pnpm publish --tag latest --registry=\"http://localhost:4873/\"",
- "test": "cd ../../ && cross-env NODE_ENV=test mocha --config packages-internal/scripts/typescript-to-proptypes/test/.mocharc.js 'packages-internal/scripts/typescript-to-proptypes/**/*.test.ts'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha --config packages-internal/scripts/typescript-to-proptypes/test/.mocharc.js 'packages-internal/scripts/typescript-to-proptypes/**/*.test.?(c|m)[jt]s?(x)'",
"typescript": "tsc --build tsconfig.typecheck.json"
},
"dependencies": {
diff --git a/packages/api-docs-builder-core/package.json b/packages/api-docs-builder-core/package.json
index 565c441b7f92da..efa01e9d607962 100644
--- a/packages/api-docs-builder-core/package.json
+++ b/packages/api-docs-builder-core/package.json
@@ -5,7 +5,7 @@
"private": "true",
"main": "./index.ts",
"scripts": {
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/api-docs-builder/**/*.test.{js,ts,tsx}'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/api-docs-builder/**/*.test.?(c|m)[jt]s?(x)'",
"typescript": "tsc -p tsconfig.json"
},
"dependencies": {
diff --git a/packages/api-docs-builder/package.json b/packages/api-docs-builder/package.json
index 54a489f56c60be..fe097f1cb5ed8a 100644
--- a/packages/api-docs-builder/package.json
+++ b/packages/api-docs-builder/package.json
@@ -4,7 +4,7 @@
"private": "true",
"main": "./index.ts",
"scripts": {
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/api-docs-builder/**/*.test.{js,ts,tsx}'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/api-docs-builder/**/*.test.?(c|m)[jt]s?(x)'",
"typescript": "tsc -p tsconfig.json"
},
"dependencies": {
diff --git a/packages/eslint-plugin-material-ui/package.json b/packages/eslint-plugin-material-ui/package.json
index 666c0e1773cc0a..258c5bf6d7c9dc 100644
--- a/packages/eslint-plugin-material-ui/package.json
+++ b/packages/eslint-plugin-material-ui/package.json
@@ -16,7 +16,7 @@
"eslint": "^8.47.0"
},
"scripts": {
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/eslint-plugin-material-ui/**/*.test.js'"
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/eslint-plugin-material-ui/**/*.test.?(c|m)[jt]s?(x)'"
},
"repository": {
"type": "git",
diff --git a/packages/mui-base/package.json b/packages/mui-base/package.json
index 0c8ebbaca68963..86e231ef8e638a 100644
--- a/packages/mui-base/package.json
+++ b/packages/mui-base/package.json
@@ -35,7 +35,7 @@
"build:types": "node ../../scripts/buildTypes.mjs",
"prebuild": "rimraf build tsconfig.build.tsbuildinfo",
"release": "pnpm build && pnpm publish",
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-base/**/*.test.{js,ts,tsx}'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-base/**/*.test.?(c|m)[jt]s?(x)'",
"typescript": "tsc -p tsconfig.json",
"typescript:module-augmentation": "node scripts/testModuleAugmentation.js"
},
diff --git a/packages/mui-codemod/package.json b/packages/mui-codemod/package.json
index ec688c03ccdb0b..f77d6494c514d2 100644
--- a/packages/mui-codemod/package.json
+++ b/packages/mui-codemod/package.json
@@ -13,7 +13,7 @@
"jscodeshift"
],
"scripts": {
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-codemod/**/*.test.js'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-codemod/**/*.test.?(c|m)[jt]s?(x)'",
"prebuild": "rimraf build",
"build": "node ../../scripts/build.mjs node --out-dir ./build && cpy README.md build && cpy package.json build && cpy codemod.js build",
"release": "pnpm build && pnpm publish"
diff --git a/packages/mui-icons-material/builder.mjs b/packages/mui-icons-material/builder.mjs
index 56b8e003e76248..6b867181e86693 100755
--- a/packages/mui-icons-material/builder.mjs
+++ b/packages/mui-icons-material/builder.mjs
@@ -245,7 +245,7 @@ export async function handler(options) {
renameFilter = renameFilterModule.default;
}
if (typeof renameFilter !== 'function') {
- throw Error('renameFilter must be a function');
+ throw new Error('renameFilter must be a function');
}
await fse.ensureDir(options.outputDir);
diff --git a/packages/mui-icons-material/fixtures/material-design-icons/expected/AccessAlarms.js b/packages/mui-icons-material/fixtures/material-design-icons/expected/AccessAlarms.js
index c84c6bdd2f9115..1229503f132bf2 100644
--- a/packages/mui-icons-material/fixtures/material-design-icons/expected/AccessAlarms.js
+++ b/packages/mui-icons-material/fixtures/material-design-icons/expected/AccessAlarms.js
@@ -1,5 +1,6 @@
+"use client";
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
-
+
, 'AccessAlarms');
diff --git a/packages/mui-icons-material/fixtures/material-design-icons/expected/AccessAlarmsTwoTone.js b/packages/mui-icons-material/fixtures/material-design-icons/expected/AccessAlarmsTwoTone.js
index f67dcb665fb58e..4d2e6b40dbcb91 100644
--- a/packages/mui-icons-material/fixtures/material-design-icons/expected/AccessAlarmsTwoTone.js
+++ b/packages/mui-icons-material/fixtures/material-design-icons/expected/AccessAlarmsTwoTone.js
@@ -1,5 +1,6 @@
+"use client";
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
- [,,]
+ [,,]
, 'AccessAlarmsTwoTone');
diff --git a/packages/mui-icons-material/fixtures/material-design-icons/expected/Accessibility.js b/packages/mui-icons-material/fixtures/material-design-icons/expected/Accessibility.js
index 829835c74b3b03..aebbcd4be9a370 100644
--- a/packages/mui-icons-material/fixtures/material-design-icons/expected/Accessibility.js
+++ b/packages/mui-icons-material/fixtures/material-design-icons/expected/Accessibility.js
@@ -1,5 +1,6 @@
+"use client";
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
-
+
, 'Accessibility');
diff --git a/packages/mui-icons-material/fixtures/material-design-icons/expected/ElevenMp.js b/packages/mui-icons-material/fixtures/material-design-icons/expected/ElevenMp.js
index 0571ae9e641392..2a92b68dbc5c06 100644
--- a/packages/mui-icons-material/fixtures/material-design-icons/expected/ElevenMp.js
+++ b/packages/mui-icons-material/fixtures/material-design-icons/expected/ElevenMp.js
@@ -1,5 +1,6 @@
+"use client";
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
-
+
, 'ElevenMp');
diff --git a/packages/mui-icons-material/fixtures/material-design-icons/expected/FiveMp.js b/packages/mui-icons-material/fixtures/material-design-icons/expected/FiveMp.js
index ff78a83211f628..da9681acad2843 100644
--- a/packages/mui-icons-material/fixtures/material-design-icons/expected/FiveMp.js
+++ b/packages/mui-icons-material/fixtures/material-design-icons/expected/FiveMp.js
@@ -1,5 +1,6 @@
+"use client";
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
-
+
, 'FiveMp');
diff --git a/packages/mui-icons-material/fixtures/material-design-icons/expected/QueueMusicOutlined.js b/packages/mui-icons-material/fixtures/material-design-icons/expected/QueueMusicOutlined.js
index efa2e958ef8d93..fb2f33a377ced2 100644
--- a/packages/mui-icons-material/fixtures/material-design-icons/expected/QueueMusicOutlined.js
+++ b/packages/mui-icons-material/fixtures/material-design-icons/expected/QueueMusicOutlined.js
@@ -1,5 +1,6 @@
+"use client";
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
-
+
, 'QueueMusicOutlined');
diff --git a/packages/mui-icons-material/fixtures/material-design-icons/expected/RecordVoiceOverTwoTone.js b/packages/mui-icons-material/fixtures/material-design-icons/expected/RecordVoiceOverTwoTone.js
index 26496474e670b5..1e70ec66a213cd 100644
--- a/packages/mui-icons-material/fixtures/material-design-icons/expected/RecordVoiceOverTwoTone.js
+++ b/packages/mui-icons-material/fixtures/material-design-icons/expected/RecordVoiceOverTwoTone.js
@@ -1,5 +1,6 @@
+"use client";
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
- [,,]
+ [,,]
, 'RecordVoiceOverTwoTone');
diff --git a/packages/mui-icons-material/fixtures/material-design-icons/expected/SixtyFps.js b/packages/mui-icons-material/fixtures/material-design-icons/expected/SixtyFps.js
index c1fff3a3928f2e..9216addca48748 100644
--- a/packages/mui-icons-material/fixtures/material-design-icons/expected/SixtyFps.js
+++ b/packages/mui-icons-material/fixtures/material-design-icons/expected/SixtyFps.js
@@ -1,5 +1,6 @@
+"use client";
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
-
+
, 'SixtyFps');
diff --git a/packages/mui-icons-material/fixtures/material-design-icons/expected/StarRounded.js b/packages/mui-icons-material/fixtures/material-design-icons/expected/StarRounded.js
index e3382cfacf67df..e51380b4f00ddc 100644
--- a/packages/mui-icons-material/fixtures/material-design-icons/expected/StarRounded.js
+++ b/packages/mui-icons-material/fixtures/material-design-icons/expected/StarRounded.js
@@ -1,5 +1,6 @@
+"use client";
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
-
+
, 'StarRounded');
diff --git a/packages/mui-icons-material/fixtures/material-design-icons/expected/ThirtyFps.js b/packages/mui-icons-material/fixtures/material-design-icons/expected/ThirtyFps.js
index 219f411560c1fc..c2cb7901a9f28b 100644
--- a/packages/mui-icons-material/fixtures/material-design-icons/expected/ThirtyFps.js
+++ b/packages/mui-icons-material/fixtures/material-design-icons/expected/ThirtyFps.js
@@ -1,5 +1,6 @@
+"use client";
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
-
+
, 'ThirtyFps');
diff --git a/packages/mui-icons-material/fixtures/material-design-icons/expected/TimesOneMobiledata.js b/packages/mui-icons-material/fixtures/material-design-icons/expected/TimesOneMobiledata.js
index 37e6edceb9a0f7..e7dfb4a67aff2c 100644
--- a/packages/mui-icons-material/fixtures/material-design-icons/expected/TimesOneMobiledata.js
+++ b/packages/mui-icons-material/fixtures/material-design-icons/expected/TimesOneMobiledata.js
@@ -1,5 +1,6 @@
+"use client";
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
-
+
, 'TimesOneMobiledata');
diff --git a/packages/mui-icons-material/fixtures/material-design-icons/expected/TwentyFourMp.js b/packages/mui-icons-material/fixtures/material-design-icons/expected/TwentyFourMp.js
index 26e2aa522bebbf..e3c60559e17d44 100644
--- a/packages/mui-icons-material/fixtures/material-design-icons/expected/TwentyFourMp.js
+++ b/packages/mui-icons-material/fixtures/material-design-icons/expected/TwentyFourMp.js
@@ -1,5 +1,6 @@
+"use client";
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
-
+
, 'TwentyFourMp');
diff --git a/packages/mui-icons-material/package.json b/packages/mui-icons-material/package.json
index a4121a6abe8bef..cbd92790c6aa05 100644
--- a/packages/mui-icons-material/package.json
+++ b/packages/mui-icons-material/package.json
@@ -40,7 +40,7 @@
"release": "pnpm build && pnpm publish",
"src:download": "node ./scripts/download.mjs",
"src:icons": "cross-env UV_THREADPOOL_SIZE=64 node ./builder.mjs --output-dir src --svg-dir material-icons --renameFilter ./renameFilters/material-design-icons.mjs && pnpm build:lib:clean",
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-icons-material/**/*.test.{mjs,js,ts,tsx}'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-icons-material/**/*.test.?(c|m)[jt]s?(x)'",
"test:built-typings": "tsc -p test/generated-types/tsconfig.json",
"typescript": "tsc -p tsconfig.json"
},
diff --git a/packages/mui-joy/package.json b/packages/mui-joy/package.json
index aa627d2063490d..9b233ab017068a 100644
--- a/packages/mui-joy/package.json
+++ b/packages/mui-joy/package.json
@@ -33,7 +33,7 @@
"build:types": "node ../../scripts/buildTypes.mjs",
"prebuild": "rimraf build tsconfig.build.tsbuildinfo",
"release": "pnpm build && pnpm publish",
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-joy/**/*.test.{js,ts,tsx}'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-joy/**/*.test.?(c|m)[jt]s?(x)'",
"typescript": "tsc -p tsconfig.json",
"typescript:module-augmentation": "node scripts/testModuleAugmentation.js"
},
diff --git a/packages/mui-lab/package.json b/packages/mui-lab/package.json
index 49a54513e91865..01aa8aa8998f6f 100644
--- a/packages/mui-lab/package.json
+++ b/packages/mui-lab/package.json
@@ -36,7 +36,7 @@
"build:types": "node ../../scripts/buildTypes.mjs",
"prebuild": "rimraf build tsconfig.build.tsbuildinfo",
"release": "pnpm build && pnpm publish",
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-lab/**/*.test.{js,ts,tsx}'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-lab/**/*.test.?(c|m)[jt]s?(x)'",
"typescript": "tsc -p tsconfig.json"
},
"dependencies": {
diff --git a/packages/mui-material-nextjs/package.json b/packages/mui-material-nextjs/package.json
index cac269b20362cf..1d267375354208 100644
--- a/packages/mui-material-nextjs/package.json
+++ b/packages/mui-material-nextjs/package.json
@@ -32,7 +32,7 @@
"build:types": "node ../../scripts/buildTypes.mjs",
"prebuild": "rimraf build tsconfig.build.tsbuildinfo",
"release": "pnpm build && pnpm publish",
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-material-nextjs/**/*.test.{js,ts,tsx}'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-material-nextjs/**/*.test.?(c|m)[jt]s?(x)'",
"typescript": "tsc -p tsconfig.json"
},
"dependencies": {
diff --git a/packages/mui-material-pigment-css/package.json b/packages/mui-material-pigment-css/package.json
index abc51abb64bd96..199906ef9152a5 100644
--- a/packages/mui-material-pigment-css/package.json
+++ b/packages/mui-material-pigment-css/package.json
@@ -34,7 +34,7 @@
"build:types": "node ../../scripts/buildTypes.mjs",
"prebuild": "rimraf build tsconfig.build.tsbuildinfo",
"release": "pnpm build && pnpm publish",
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-material/**/*.test.{js,ts,tsx}'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-material/**/*.test.?(c|m)[jt]s?(x)'",
"typescript": "tsc -p tsconfig.json",
"typescript:module-augmentation": "node scripts/testModuleAugmentation.js"
},
diff --git a/packages/mui-material/package.json b/packages/mui-material/package.json
index d9255cbeee46be..5281cca04fe47a 100644
--- a/packages/mui-material/package.json
+++ b/packages/mui-material/package.json
@@ -35,7 +35,7 @@
"build:types": "node ../../scripts/buildTypes.mjs",
"prebuild": "rimraf build tsconfig.build.tsbuildinfo",
"release": "pnpm build && pnpm publish",
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-material/**/*.test.{js,ts,tsx}'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-material/**/*.test.?(c|m)[jt]s?(x)'",
"typescript": "tsc -p tsconfig.json",
"typescript:module-augmentation": "node scripts/testModuleAugmentation.js"
},
diff --git a/packages/mui-private-theming/package.json b/packages/mui-private-theming/package.json
index 2553d1cbe05422..4dbeac187db4b1 100644
--- a/packages/mui-private-theming/package.json
+++ b/packages/mui-private-theming/package.json
@@ -33,7 +33,7 @@
"build:copy-files": "node ../../scripts/copyFiles.mjs",
"prebuild": "rimraf build",
"release": "pnpm build && pnpm publish",
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-private-theming/**/*.test.{js,ts,tsx}'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-private-theming/**/*.test.?(c|m)[jt]s?(x)'",
"typescript": "tsc -p tsconfig.json"
},
"dependencies": {
diff --git a/packages/mui-styled-engine-sc/package.json b/packages/mui-styled-engine-sc/package.json
index 3708e6b4150638..3ac200fd057d63 100644
--- a/packages/mui-styled-engine-sc/package.json
+++ b/packages/mui-styled-engine-sc/package.json
@@ -33,7 +33,7 @@
"build:copy-files": "node ../../scripts/copyFiles.mjs",
"prebuild": "rimraf build",
"release": "pnpm build && pnpm publish",
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-styled-engine-sc/**/*.test.{js,ts,tsx}'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-styled-engine-sc/**/*.test.?(c|m)[jt]s?(x)'",
"typescript": "tsc -p tsconfig.json"
},
"dependencies": {
diff --git a/packages/mui-styled-engine/package.json b/packages/mui-styled-engine/package.json
index 29b18a2532e4bd..877094858ebcc1 100644
--- a/packages/mui-styled-engine/package.json
+++ b/packages/mui-styled-engine/package.json
@@ -33,7 +33,7 @@
"build:copy-files": "node ../../scripts/copyFiles.mjs",
"prebuild": "rimraf build",
"release": "pnpm build && pnpm publish",
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-styled-engine/**/*.test.{js,ts,tsx}'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-styled-engine/**/*.test.?(c|m)[jt]s?(x)'",
"typescript": "tsc -p tsconfig.json"
},
"dependencies": {
diff --git a/packages/mui-styles/package.json b/packages/mui-styles/package.json
index 9210eba1fc773c..8f400072e8b642 100644
--- a/packages/mui-styles/package.json
+++ b/packages/mui-styles/package.json
@@ -33,7 +33,7 @@
"build:copy-files": "node ../../scripts/copyFiles.mjs",
"prebuild": "rimraf build",
"release": "pnpm build && pnpm publish",
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-styles/**/*.test.{js,ts,tsx}'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-styles/**/*.test.?(c|m)[jt]s?(x)'",
"typescript": "tsc -p tsconfig.json"
},
"dependencies": {
diff --git a/packages/mui-system/package.json b/packages/mui-system/package.json
index 599c920c8a50c2..2edf581348a93b 100644
--- a/packages/mui-system/package.json
+++ b/packages/mui-system/package.json
@@ -34,7 +34,7 @@
"build:types": "node ../../scripts/buildTypes.mjs",
"prebuild": "rimraf build tsconfig.build.tsbuildinfo",
"release": "pnpm build && pnpm publish",
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-system/**/*.test.{js,ts,tsx}'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-system/**/*.test.?(c|m)[jt]s?(x)'",
"typescript": "tsc -p tsconfig.json",
"typescript:module-augmentation": "node scripts/testModuleAugmentation.js"
},
diff --git a/packages/mui-utils/package.json b/packages/mui-utils/package.json
index 83a43a96cd6971..20b9711c228cc0 100644
--- a/packages/mui-utils/package.json
+++ b/packages/mui-utils/package.json
@@ -34,7 +34,7 @@
"build:types": "node ../../scripts/buildTypes.mjs",
"prebuild": "rimraf build tsconfig.build.tsbuildinfo",
"release": "pnpm build && pnpm publish",
- "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-utils/**/*.test.{js,ts,tsx}'",
+ "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-utils/**/*.test.?(c|m)[jt]s?(x)'",
"typescript": "tsc -p tsconfig.json"
},
"dependencies": {