Skip to content

Commit

Permalink
chore(build): Fix lint errors (#9950)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlabaj authored Jan 9, 2024
1 parent fe40f4a commit ae9011b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ test('Renders with the label wrapper if isLabelWrapped is provided', () => {
});

test('Renders with span element around the inner label text if isLabelWrapped is provided', () => {
const labelText = "test checkbox label";
const labelText = 'test checkbox label';
render(<Checkbox id="test-id" isLabelWrapped label={labelText} />);

expect(screen.getByText(labelText).tagName).toBe('SPAN');
Expand All @@ -257,14 +257,14 @@ test('Renders with the label wrapper if component is set to label', () => {
});

test('Renders with span element around the inner label text if component is set to label', () => {
const labelText = "test checkbox label";
const labelText = 'test checkbox label';
render(<Checkbox id="test-id" component="label" label={labelText} />);

expect(screen.getByText(labelText).tagName).toBe('SPAN');
});

test('Renders label before checkbox input if isLabelBeforeButton is provided', () => {
render(<Checkbox id="test-id" isLabelBeforeButton label={"test checkbox label"} />);
render(<Checkbox id="test-id" isLabelBeforeButton label={'test checkbox label'} />);

const wrapper = screen.getByRole('checkbox').parentElement!;

Check warning on line 269 in packages/react-core/src/components/Checkbox/__tests__/Checkbox.test.tsx

View workflow job for this annotation

GitHub Actions / lint

Forbidden non-null assertion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ describe('Radio', () => {
});

test('Renders label before radio input if isLabelBeforeButton is provided', () => {
render(<Radio id="test-id" name="check" isLabelBeforeButton label={"test radio label"} />);
render(<Radio id="test-id" name="check" isLabelBeforeButton label={'test radio label'} />);

const wrapper = screen.getByRole('radio').parentElement!;

expect(wrapper.children[0].tagName).toBe('LABEL');
expect(wrapper.children[1].tagName).toBe('INPUT');
});
Expand Down

0 comments on commit ae9011b

Please sign in to comment.