diff --git a/packages/mui-joy/src/FormControl/FormControl.test.tsx b/packages/mui-joy/src/FormControl/FormControl.test.tsx
index e9fe8519a827c6..939f74e732f6b8 100644
--- a/packages/mui-joy/src/FormControl/FormControl.test.tsx
+++ b/packages/mui-joy/src/FormControl/FormControl.test.tsx
@@ -110,24 +110,6 @@ describe('', () => {
expect(getByRole('textbox')).to.have.attribute('required');
});
-
- it('should inherit htmlFor from FormControl if htmlFor is undefined', () => {
- const { getByText } = render(
-
- label
- ,
- );
- expect(getByText('label')).to.have.attribute('for');
- });
-
- it('should inherit id from FormControl if id is undefined', () => {
- const { getByText } = render(
-
- label
- ,
- );
- expect(getByText('label')).to.have.attribute('id');
- });
});
describe('Textarea', () => {
@@ -523,4 +505,22 @@ describe('', () => {
expect(getByRole('combobox')).to.have.attribute('disabled');
});
});
+
+ it('should inherit htmlFor from FormControl if htmlFor is undefined', () => {
+ const { getByText } = render(
+
+ label
+ ,
+ );
+ expect(getByText('label')).to.have.attribute('for');
+ });
+
+ it('should inherit id from FormControl if id is undefined', () => {
+ const { getByText } = render(
+
+ label
+ ,
+ );
+ expect(getByText('label')).to.have.attribute('id');
+ });
});