<commit_before>diff --git a/babel.config.js b/babel.config.js
index 658f4724f9..338d8c46a9 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -42,7 +42,13 @@ module.exports = function getBabelConfig(api) {
         shippedProposals: api.env('modern'),
       },
     ],
-    '@babel/preset-react',
+    [
+      '@babel/preset-react',
+      {
+        // default in Babel 8
+        runtime: 'automatic',
+      },
+    ],
     '@babel/preset-typescript',
   ];
 
diff --git a/packages/material-ui-styles/src/ThemeProvider/ThemeProvider.test.js b/packages/material-ui-styles/src/ThemeProvider/ThemeProvider.test.js
index cab486d9db..3107739555 100644
--- a/packages/material-ui-styles/src/ThemeProvider/ThemeProvider.test.js
+++ b/packages/material-ui-styles/src/ThemeProvider/ThemeProvider.test.js
@@ -122,11 +122,7 @@ describe('ThemeProvider', () => {
             <div />
           </ThemeProvider>,
         );
-      }).toErrorDev([
-        'However, no outer theme is present.',
-        // strict mode renders twice
-        'However, no outer theme is present.',
-      ]);
+      }).toErrorDev(['However, no outer theme is present.']);
     });
 
     it('should warn about wrong theme function', () => {
@@ -139,11 +135,7 @@ describe('ThemeProvider', () => {
             ,
           </ThemeProvider>,
         );
-      }).toErrorDev([
-        'Material-UI: You should return an object from your theme function',
-        // strict mode renders twice
-        'Material-UI: You should return an object from your theme function',
-      ]);
+      }).toErrorDev(['Material-UI: You should return an object from your theme function']);
     });
   });
 });
diff --git a/packages/material-ui-styles/src/useThemeVariants/useThemeVariants.test.js b/packages/material-ui-styles/src/useThemeVariants/useThemeVariants.test.js
index 2ab151c6c8..6db6326d77 100644
--- a/packages/material-ui-styles/src/useThemeVariants/useThemeVariants.test.js
+++ b/packages/material-ui-styles/src/useThemeVariants/useThemeVariants.test.js
@@ -135,11 +135,6 @@ describe('useThemeVariants', () => {
         </ThemeProvider>,
       ),
     ).toErrorDev([
-      // strict mode renders twice
-      [
-        `Material-UI: You are using a variant value \`test\` for which you didn't define styles.`,
-        `Please create a new variant matcher in your theme for this variant. To learn more about matchers visit https://next.material-ui.com/r/custom-component-variants.`,
-      ].join('\n'),
       [
         `Material-UI: You are using a variant value \`test\` for which you didn't define styles.`,
         `Please create a new variant matcher in your theme for this variant. To learn more about matchers visit https://next.material-ui.com/r/custom-component-variants.`,
diff --git a/packages/material-ui/src/Autocomplete/Autocomplete.test.js b/packages/material-ui/src/Autocomplete/Autocomplete.test.js
index cd02208b63..f3beebd4bc 100644
--- a/packages/material-ui/src/Autocomplete/Autocomplete.test.js
+++ b/packages/material-ui/src/Autocomplete/Autocomplete.test.js
@@ -1181,10 +1181,6 @@ describe('<Autocomplete />', () => {
         fireEvent.change(textbox, { target: { value: 'a' } });
         fireEvent.keyDown(textbox, { key: 'Enter' });
       }).toErrorDev([
-        'Material-UI: The `getOptionLabel` method of Autocomplete returned undefined instead of a string',
-        // strict mode renders twice
-        'Material-UI: The `getOptionLabel` method of Autocomplete returned undefined instead of a string',
-        // strict mode renders twice
         'Material-UI: The `getOptionLabel` method of Autocomplete returned undefined instead of a string',
         'Material-UI: The `getOptionLabel` method of Autocomplete returned undefined instead of a string',
         'Material-UI: The `getOptionLabel` method of Autocomplete returned undefined instead of a string',
@@ -1238,9 +1234,6 @@ describe('<Autocomplete />', () => {
           />,
         );
       }).toWarnDev([
-        'None of the options match with `"not a good value"`',
-        // strict mode renders twice
-        'None of the options match with `"not a good value"`',
         'None of the options match with `"not a good value"`',
         'None of the options match with `"not a good value"`',
       ]);
@@ -1266,11 +1259,7 @@ describe('<Autocomplete />', () => {
             groupBy={(option) => option.group}
           />,
         );
-      }).toWarnDev([
-        // strict mode renders twice
-        'returns duplicated headers',
-        'returns duplicated headers',
-      ]);
+      }).toWarnDev(['returns duplicated headers']);
       const options = screen.getAllByRole('option').map((el) => el.textContent);
       expect(options).to.have.length(7);
       expect(options).to.deep.equal(['A', 'D', 'E', 'B', 'G', 'F', 'C']);
diff --git a/packages/material-ui/src/Breadcrumbs/Breadcrumbs.test.js b/packages/material-ui/src/Breadcrumbs/Breadcrumbs.test.js
index d5c5735ecf..86a4ebdece 100644
--- a/packages/material-ui/src/Breadcrumbs/Breadcrumbs.test.js
+++ b/packages/material-ui/src/Breadcrumbs/Breadcrumbs.test.js
@@ -100,7 +100,6 @@ describe('<Breadcrumbs />', () => {
       );
     }).toErrorDev([
       'Material-UI: You have provided an invalid combination of props to the Breadcrumbs.\nitemsAfterCollapse={2} + itemsBeforeCollapse={2} >= maxItems={3}',
-      'Material-UI: You have provided an invalid combination of props to the Breadcrumbs.\nitemsAfterCollapse={2} + itemsBeforeCollapse={2} >= maxItems={3}',
     ]);
     expect(screen.getAllByRole('listitem', { hidden: false })).to.have.length(4);
     expect(screen.getByRole('list')).to.have.text('first/second/third/fourth');
diff --git a/packages/material-ui/src/ClickAwayListener/ClickAwayListener.test.js b/packages/material-ui/src/ClickAwayListener/ClickAwayListener.test.js
index fe9020d480..52d53b4bea 100644
--- a/packages/material-ui/src/ClickAwayListener/ClickAwayListener.test.js
+++ b/packages/material-ui/src/ClickAwayListener/ClickAwayListener.test.js
@@ -160,8 +160,7 @@ describe('<ClickAwayListener />', () => {
       expect(handleClickAway.callCount).to.equal(0);
 
       fireEvent.click(getByText('Stop inside a portal'));
-      // True-negative, we don't have enough information to do otherwise.
-      expect(handleClickAway.callCount).to.equal(1);
+      expect(handleClickAway.callCount).to.equal(0);
     });
 
     it('should not be called during the same event that mounted the ClickAwayListener', () => {
diff --git a/packages/material-ui/src/Tabs/Tabs.test.js b/packages/material-ui/src/Tabs/Tabs.test.js
index 50e4f67d73..70e07d3da7 100644
--- a/packages/material-ui/src/Tabs/Tabs.test.js
+++ b/packages/material-ui/src/Tabs/Tabs.test.js
@@ -91,9 +91,6 @@ describe('<Tabs />', () => {
       expect(() => {
         render(<Tabs value={0} centered variant="scrollable" />);
       }).toErrorDev([
-        'Material-UI: You can not use the `centered={true}` and `variant="scrollable"`',
-        // StrictMode renders twice
-        'Material-UI: You can not use the `centered={true}` and `variant="scrollable"`',
         'Material-UI: You can not use the `centered={true}` and `variant="scrollable"`',
         'Material-UI: You can not use the `centered={true}` and `variant="scrollable"`',
       ]);
diff --git a/packages/material-ui/src/TextareaAutosize/TextareaAutosize.test.js b/packages/material-ui/src/TextareaAutosize/TextareaAutosize.test.js
index cca7f0ee6c..5a878b6462 100644
--- a/packages/material-ui/src/TextareaAutosize/TextareaAutosize.test.js
+++ b/packages/material-ui/src/TextareaAutosize/TextareaAutosize.test.js
@@ -286,12 +286,7 @@ describe('<TextareaAutosize />', () => {
 
         expect(() => {
           forceUpdate();
-        }).toErrorDev([
-          'Material-UI: Too many re-renders.',
-          // strict mode renders twice
-          'Material-UI: Too many re-renders.',
-          'Material-UI: Too many re-renders.',
-        ]);
+        }).toErrorDev(['Material-UI: Too many re-renders.']);
       });
     });
   });
diff --git a/packages/material-ui/src/internal/SwitchBase.test.js b/packages/material-ui/src/internal/SwitchBase.test.js
index 3f26a11e1b..3732eb2e9a 100644
--- a/packages/material-ui/src/internal/SwitchBase.test.js
+++ b/packages/material-ui/src/internal/SwitchBase.test.js
@@ -393,7 +393,7 @@ describe('<SwitchBase />', () => {
         setProps({ checked: true });
         global['didWarnControlledToUncontrolled'] = true;
       }).toErrorDev([
-        'Warning: A component is changing an uncontrolled input of type checkbox to be controlled.',
+        'Warning: A component is changing an uncontrolled input to be controlled.',
         'Material-UI: A component is changing the uncontrolled checked state of SwitchBase to be controlled.',
       ]);
     });
@@ -414,7 +414,7 @@ describe('<SwitchBase />', () => {
         setProps({ checked: undefined });
         global['didWarnControlledToUncontrolled'] = true;
       }).toErrorDev([
-        'Warning: A component is changing a controlled input of type checkbox to be uncontrolled.',
+        'Warning: A component is changing a controlled input to be uncontrolled',
         'Material-UI: A component is changing the controlled checked state of SwitchBase to be uncontrolled.',
       ]);
     });
diff --git a/packages/material-ui/src/useMediaQuery/useMediaQuery.test.js b/packages/material-ui/src/useMediaQuery/useMediaQuery.test.js<commit_msg>[test] Update react next patch (#24934)<commit_after>diff --git a/babel.config.js b/babel.config.js
index 658f4724f9..338d8c46a9 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -42,7 +42,13 @@ module.exports = function getBabelConfig(api) {
         shippedProposals: api.env('modern'),
       },
     ],
-    '@babel/preset-react',
+    [
+      '@babel/preset-react',
+      {
+        // default in Babel 8
+        runtime: 'automatic',
+      },
+    ],
     '@babel/preset-typescript',
   ];
 
diff --git a/packages/material-ui-styles/src/ThemeProvider/ThemeProvider.test.js b/packages/material-ui-styles/src/ThemeProvider/ThemeProvider.test.js
index 332d7eb0c7..24ffc904d3 100644
--- a/packages/material-ui-styles/src/ThemeProvider/ThemeProvider.test.js
+++ b/packages/material-ui-styles/src/ThemeProvider/ThemeProvider.test.js
@@ -122,11 +122,7 @@ describe('ThemeProvider', () => {
             <div />
           </ThemeProvider>,
         );
-      }).toErrorDev([
-        'However, no outer theme is present.',
-        // strict mode renders twice
-        'However, no outer theme is present.',
-      ]);
+      }).toErrorDev(['However, no outer theme is present.']);
     });
 
     it('should warn about wrong theme function', () => {
@@ -139,11 +135,7 @@ describe('ThemeProvider', () => {
             ,
           </ThemeProvider>,
         );
-      }).toErrorDev([
-        'Material-UI: You should return an object from your theme function',
-        // strict mode renders twice
-        'Material-UI: You should return an object from your theme function',
-      ]);
+      }).toErrorDev(['Material-UI: You should return an object from your theme function']);
     });
   });
 });
diff --git a/packages/material-ui-styles/src/useThemeVariants/useThemeVariants.test.js b/packages/material-ui-styles/src/useThemeVariants/useThemeVariants.test.js
index 1360442ce6..462c67a27f 100644
--- a/packages/material-ui-styles/src/useThemeVariants/useThemeVariants.test.js
+++ b/packages/material-ui-styles/src/useThemeVariants/useThemeVariants.test.js
@@ -135,11 +135,6 @@ describe('useThemeVariants', () => {
         </ThemeProvider>,
       ),
     ).toErrorDev([
-      // strict mode renders twice
-      [
-        `Material-UI: You are using a variant value \`test\` for which you didn't define styles.`,
-        `Please create a new variant matcher in your theme for this variant. To learn more about matchers visit https://next.material-ui.com/r/custom-component-variants.`,
-      ].join('\n'),
       [
         `Material-UI: You are using a variant value \`test\` for which you didn't define styles.`,
         `Please create a new variant matcher in your theme for this variant. To learn more about matchers visit https://next.material-ui.com/r/custom-component-variants.`,
diff --git a/packages/material-ui/src/Autocomplete/Autocomplete.test.js b/packages/material-ui/src/Autocomplete/Autocomplete.test.js
index 2556f4d94d..787fc72d3b 100644
--- a/packages/material-ui/src/Autocomplete/Autocomplete.test.js
+++ b/packages/material-ui/src/Autocomplete/Autocomplete.test.js
@@ -1192,10 +1192,6 @@ describe('<Autocomplete />', () => {
         fireEvent.change(textbox, { target: { value: 'a' } });
         fireEvent.keyDown(textbox, { key: 'Enter' });
       }).toErrorDev([
-        'Material-UI: The `getOptionLabel` method of Autocomplete returned undefined instead of a string',
-        // strict mode renders twice
-        'Material-UI: The `getOptionLabel` method of Autocomplete returned undefined instead of a string',
-        // strict mode renders twice
         'Material-UI: The `getOptionLabel` method of Autocomplete returned undefined instead of a string',
         'Material-UI: The `getOptionLabel` method of Autocomplete returned undefined instead of a string',
         'Material-UI: The `getOptionLabel` method of Autocomplete returned undefined instead of a string',
@@ -1249,9 +1245,6 @@ describe('<Autocomplete />', () => {
           />,
         );
       }).toWarnDev([
-        'None of the options match with `"not a good value"`',
-        // strict mode renders twice
-        'None of the options match with `"not a good value"`',
         'None of the options match with `"not a good value"`',
         'None of the options match with `"not a good value"`',
       ]);
@@ -1277,11 +1270,7 @@ describe('<Autocomplete />', () => {
             groupBy={(option) => option.group}
           />,
         );
-      }).toWarnDev([
-        // strict mode renders twice
-        'returns duplicated headers',
-        'returns duplicated headers',
-      ]);
+      }).toWarnDev(['returns duplicated headers']);
       const options = screen.getAllByRole('option').map((el) => el.textContent);
       expect(options).to.have.length(7);
       expect(options).to.deep.equal(['A', 'D', 'E', 'B', 'G', 'F', 'C']);
diff --git a/packages/material-ui/src/Breadcrumbs/Breadcrumbs.test.js b/packages/material-ui/src/Breadcrumbs/Breadcrumbs.test.js
index acf662d0d9..4f5b503653 100644
--- a/packages/material-ui/src/Breadcrumbs/Breadcrumbs.test.js
+++ b/packages/material-ui/src/Breadcrumbs/Breadcrumbs.test.js
@@ -88,7 +88,6 @@ describe('<Breadcrumbs />', () => {
       );
     }).toErrorDev([
       'Material-UI: You have provided an invalid combination of props to the Breadcrumbs.\nitemsAfterCollapse={2} + itemsBeforeCollapse={2} >= maxItems={3}',
-      'Material-UI: You have provided an invalid combination of props to the Breadcrumbs.\nitemsAfterCollapse={2} + itemsBeforeCollapse={2} >= maxItems={3}',
     ]);
     expect(screen.getAllByRole('listitem', { hidden: false })).to.have.length(4);
     expect(screen.getByRole('list')).to.have.text('first/second/third/fourth');
diff --git a/packages/material-ui/src/ClickAwayListener/ClickAwayListener.test.js b/packages/material-ui/src/ClickAwayListener/ClickAwayListener.test.js
index fe9020d480..52d53b4bea 100644
--- a/packages/material-ui/src/ClickAwayListener/ClickAwayListener.test.js
+++ b/packages/material-ui/src/ClickAwayListener/ClickAwayListener.test.js
@@ -160,8 +160,7 @@ describe('<ClickAwayListener />', () => {
       expect(handleClickAway.callCount).to.equal(0);
 
       fireEvent.click(getByText('Stop inside a portal'));
-      // True-negative, we don't have enough information to do otherwise.
-      expect(handleClickAway.callCount).to.equal(1);
+      expect(handleClickAway.callCount).to.equal(0);
     });
 
     it('should not be called during the same event that mounted the ClickAwayListener', () => {
diff --git a/packages/material-ui/src/Tabs/Tabs.test.js b/packages/material-ui/src/Tabs/Tabs.test.js
index 50e4f67d73..70e07d3da7 100644
--- a/packages/material-ui/src/Tabs/Tabs.test.js
+++ b/packages/material-ui/src/Tabs/Tabs.test.js
@@ -91,9 +91,6 @@ describe('<Tabs />', () => {
       expect(() => {
         render(<Tabs value={0} centered variant="scrollable" />);
       }).toErrorDev([
-        'Material-UI: You can not use the `centered={true}` and `variant="scrollable"`',
-        // StrictMode renders twice
-        'Material-UI: You can not use the `centered={true}` and `variant="scrollable"`',
         'Material-UI: You can not use the `centered={true}` and `variant="scrollable"`',
         'Material-UI: You can not use the `centered={true}` and `variant="scrollable"`',
       ]);
diff --git a/packages/material-ui/src/TextareaAutosize/TextareaAutosize.test.js b/packages/material-ui/src/TextareaAutosize/TextareaAutosize.test.js
index cca7f0ee6c..5a878b6462 100644
--- a/packages/material-ui/src/TextareaAutosize/TextareaAutosize.test.js
+++ b/packages/material-ui/src/TextareaAutosize/TextareaAutosize.test.js
@@ -286,12 +286,7 @@ describe('<TextareaAutosize />', () => {
 
         expect(() => {
           forceUpdate();
-        }).toErrorDev([
-          'Material-UI: Too many re-renders.',
-          // strict mode renders twice
-          'Material-UI: Too many re-renders.',
-          'Material-UI: Too many re-renders.',
-        ]);
+        }).toErrorDev(['Material-UI: Too many re-renders.']);
       });
     });
   });
diff --git a/packages/material-ui/src/internal/SwitchBase.test.js b/packages/material-ui/src/internal/SwitchBase.test.js
index 2753fb3257..011a312021 100644
--- a/packages/material-ui/src/internal/SwitchBase.test.js
+++ b/packages/material-ui/src/internal/SwitchBase.test.js
@@ -391,7 +391,7 @@ describe('<SwitchBase />', () => {
         setProps({ checked: true });
         global.didWarnControlledToUncontrolled = true;
       }).toErrorDev([
-        'Warning: A component is changing an uncontrolled input of type checkbox to be controlled.',
+        'Warning: A component is changing an uncontrolled input to be controlled.',
         'Material-UI: A component is changing the uncontrolled checked state of SwitchBase to be controlled.',
       ]);
     });
@@ -412,7 +412,7 @@ describe('<SwitchBase />', () => {
         setProps({ checked: undefined });
         global.didWarnControlledToUncontrolled = true;
       }).toErrorDev([
-        'Warning: A component is changing a controlled input of type checkbox to be uncontrolled.',
+        'Warning: A component is changing a controlled input to be uncontrolled',
         'Material-UI: A component is changing the controlled checked state of SwitchBase to be uncontrolled.',
       ]);
     });
diff --git a/packages/material-ui/src/useMediaQuery/useMediaQuery.test.js b/packages/material-ui/src/useMediaQuery/useMediaQuery.test.js
{'fraction_non_alphanumeric': 0.1546201664735012, 'fraction_numerical': 0.031134759245601096, 'mean_word_length': 3.0133192389006345, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 75, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1424906', 'n_tokens_mistral': 6257, 'n_tokens_neox': 5830, 'n_words': 1296}