+
+
+ {/* should work regardless how it's nested */}
+
+
+ ,
+ );
+ }).toErrorDev([
+ 'MUI: There are multiple `InputBase` components inside a FormControl.\nThis creates visual inconsistencies, only use one `InputBase`.',
+ // React 18 Strict Effects run mount effects twice
+ React.version.startsWith('18') &&
+ 'MUI: There are multiple `InputBase` components inside a FormControl.\nThis creates visual inconsistencies, only use one `InputBase`.',
+ ]);
+ });
+
+ it('should not warn if only one input is rendered', () => {
+ expect(() => {
+ render(
+