Skip to content

Commit 590ea66

Browse files
lint
1 parent 653089a commit 590ea66

File tree

6 files changed

+31
-11
lines changed

6 files changed

+31
-11
lines changed

src/components/form-elements/error-message/__tests__/ErrorMessage.test.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ describe('ErrorMessage', () => {
2727
});
2828

2929
it('contains HTML', () => {
30-
const { container } = render(<ErrorMessage>Error<span>this errored</span></ErrorMessage>);
30+
const { container } = render(
31+
<ErrorMessage>
32+
Error<span>this errored</span>
33+
</ErrorMessage>,
34+
);
3135
expect(container.innerHTML).toMatch(`Error<span>this errored</span>`);
32-
})
36+
});
3337
});

src/components/form-elements/label/__tests__/Label.test.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,14 @@ describe('Label', () => {
5555
});
5656

5757
it('renders with HTML', () => {
58-
const { container } = render(<Label>Text<span>and text within HTML</span></Label>);
58+
const { container } = render(
59+
<Label>
60+
Text<span>and text within HTML</span>
61+
</Label>,
62+
);
5963

60-
expect(container.querySelector('label')?.innerHTML).toMatch('Text<span>and text within HTML</span>')
61-
64+
expect(container.querySelector('label')?.innerHTML).toMatch(
65+
'Text<span>and text within HTML</span>',
66+
);
6267
});
6368
});

src/components/form-elements/legend/__tests__/Legend.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,4 @@ describe('Legend', () => {
4343

4444
expect(container.querySelector('legend')).toBeNull();
4545
});
46-
4746
});

stories/Form Elements/ErrorMessage.stories.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ export const EmptyVisuallyHiddenText: Story = {
4747
};
4848

4949
export const WithHTML: Story = {
50-
args: { children: <>Enter your full name (or call <span className="nhsuk-u-nowrap">999 123 4567</span>)</>},
50+
args: {
51+
children: (
52+
<>
53+
Enter your full name (or call <span className="nhsuk-u-nowrap">999 123 4567</span>)
54+
</>
55+
),
56+
},
5157
argTypes: { visuallyHiddenText: { control: false } },
52-
}
58+
};

stories/Form Elements/Fieldset.stories.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ export const WithLegendHTML: Story = {
7979
name: 'With Legend HTML',
8080
render: () => (
8181
<Fieldset>
82-
<Fieldset.Legend>What is your address? <strong>small note: this is your home address</strong></Fieldset.Legend>
82+
<Fieldset.Legend>
83+
What is your address? <strong>small note: this is your home address</strong>
84+
</Fieldset.Legend>
8385
</Fieldset>
8486
),
8587
};

stories/Form Elements/Label.stories.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ export const WithCustomSizeXL: Story = {
5555
export const WithHTML: Story = {
5656
name: 'With HTML',
5757
args: {
58-
children: <>This has <span>a span HTML element</span></>,
58+
children: (
59+
<>
60+
This has <span>a span HTML element</span>
61+
</>
62+
),
5963
},
60-
};
64+
};

0 commit comments

Comments
 (0)