Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@
"@typescript-eslint/eslint-plugin": "^8.33.1",
"@typescript-eslint/parser": "catalog:",
"@vitejs/plugin-react": "catalog:",
"@vitest/browser": "^3.2.2",
"@vitest/coverage-v8": "^3.2.2",
"@vitest/browser": "catalog:",
"@vitest/coverage-v8": "catalog:",
"@vvago/vale": "^3.11.2",
"autoprefixer": "catalog:",
"axe-core": "4.10.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid/src/tests/layout.DataGrid.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ describe('<DataGrid /> - Layout & warnings', () => {
'The Data Grid component requires all rows to have a unique `id` property',
reactMajor < 19 &&
'The Data Grid component requires all rows to have a unique `id` property',
reactMajor < 19 && 'The above error occurred in the <DataGrid> component',
reactMajor < 19 && 'The above error occurred in the <ForwardRef(DataGrid2)> component',
]);
expect((errorRef.current as any).errors).to.have.length(1);
expect((errorRef.current as any).errors[0].toString()).to.include(
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid/src/tests/slots.DataGrid.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ describe('<DataGrid /> - Slots', () => {
'MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.',
reactMajor < 19 &&
'MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.',
reactMajor < 19 && 'The above error occurred in the <GridOverlay> component',
reactMajor < 19 && 'The above error occurred in the <ForwardRef(GridOverlay2)> component',
]);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ describeTreeView<
'Encountered two children with the same key, `1`',
'MUI X: The Tree View component requires all items to have a unique `id` property.',
'Alternatively, you can use the `getItemId` prop to specify a custom id for each item',
reactMajor < 19 && `The above error occurred in the <TreeItem> component`,
reactMajor < 19 && `The above error occurred in the <TreeItem> component`,
reactMajor < 19 && `The above error occurred in the <ForwardRef(TreeItem2)> component`,
reactMajor < 19 && `The above error occurred in the <ForwardRef(TreeItem2)> component`,
]);
} else {
expect(() =>
Expand All @@ -38,7 +38,8 @@ describeTreeView<
'MUI X: The Tree View component requires all items to have a unique `id` property.',
reactMajor < 19 &&
'MUI X: The Tree View component requires all items to have a unique `id` property.',
reactMajor < 19 && `The above error occurred in the <${treeViewComponentName}> component`,
reactMajor < 19 &&
`The above error occurred in the <ForwardRef(${treeViewComponentName}2)> component`,
]);
}
});
Expand Down
626 changes: 325 additions & 301 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ catalog:
'@types/semver': ^7.7.0
'@types/use-sync-external-store': ^1.5.0
'@typescript-eslint/parser': ^8.33.1
'@vitejs/plugin-react': ^4.5.1
autoprefixer: ^10.4.21
babel-plugin-module-resolver: ^5.0.2
babel-plugin-optimize-clsx: ^2.6.2
Expand Down Expand Up @@ -83,6 +82,11 @@ catalog:
stylis: ^4.3.6
tsx: ^4.19.4
use-sync-external-store: ^1.5.0
vitest: 3.2.2
vitest: 3.2.3
'@vitejs/plugin-react': ^4.5.2
'@vitejs/plugin-react-swc': ^3.10.2
'@vitest/coverage-v8': ^3.2.2
'@vitest/browser': ^3.2.2
'@vitest/ui': ^3.2.2
webpack-bundle-analyzer: ^4.10.2
yargs: ^18.0.0
2 changes: 1 addition & 1 deletion test/e2e/vite.config.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { alias } from '../../vitest.shared.mjs';
import { alias } from '../../vitest.shared.mts';

export default defineConfig({
build: {
Expand Down
6 changes: 3 additions & 3 deletions test/performance-charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@vitejs/plugin-react": "catalog:",
"@vitejs/plugin-react-swc": "^3.10.1",
"@vitest/browser": "3.2.2",
"@vitest/ui": "3.2.2",
"@vitejs/plugin-react-swc": "catalog:",
"@vitest/browser": "catalog:",
"@vitest/ui": "catalog:",
"jsdom": "^26.1.0",
"react": "catalog:",
"react-dom": "catalog:",
Expand Down
2 changes: 1 addition & 1 deletion test/regressions/vite.config.mts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'path';
import { defineConfig, transformWithEsbuild } from 'vite';
import react from '@vitejs/plugin-react';
import { alias } from '../../vitest.shared.mjs';
import { alias } from '../../vitest.shared.mts';

export default defineConfig({
build: {
Expand Down
21 changes: 3 additions & 18 deletions vitest.shared.mts
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,9 @@ export const alias = [
];

export default defineConfig({
plugins: [
react({
babel: {
plugins: [
[
'@mui/internal-babel-plugin-display-name',
{
allowedCallees: {
'@mui/x-internals/forwardRef': ['forwardRef'],
},
},
],
],
babelrc: false,
configFile: false,
},
}),
],
// If enabling babel plugins, ensure the tests in CI are stable
// https://github.com/mui/mui-x/pull/18341
plugins: [react()],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this was the culprit for almost 100% flaky tests, I'm all in with the compromise. 👍
Great work finding the root cause! 💙 💯

// We seem to need both this and the `env` property below to make it work.
define: {
'process.env.NODE_ENV': '"test"',
Expand Down