diff --git a/src/SelectableBox/tests/SelectableBoxSet.test.jsx b/src/SelectableBox/tests/SelectableBoxSet.test.jsx
index 934220403b..9ec8d4b625 100644
--- a/src/SelectableBox/tests/SelectableBoxSet.test.jsx
+++ b/src/SelectableBox/tests/SelectableBoxSet.test.jsx
@@ -4,6 +4,8 @@ import '@testing-library/jest-dom/extend-expect';
import userEvent from '@testing-library/user-event';
import SelectableBox from '..';
+const boxText = (text) => `SelectableBox${text}`;
+
const checkboxType = 'checkbox';
const checkboxText = (text) => `SelectableCheckbox${text}`;
@@ -12,6 +14,16 @@ const radioText = (text) => `SelectableRadio${text}`;
const ariaLabel = 'test-default-label';
+function SelectableBoxSet(props) {
+ return (
+
+ {boxText(1)}
+ {boxText(2)}
+ {boxText(3)}
+
+ );
+}
+
function SelectableCheckboxSet(props) {
return (
@@ -68,11 +80,8 @@ describe('', () => {
expect(screen.getByTestId('checkbox-set')).toBeInTheDocument();
});
it('renders with radio type if neither checkbox nor radio is passed', () => {
- const originalError = console.error;
- console.error = jest.fn();
- render();
+ render();
expect(screen.getByTestId('radio-set')).toBeInTheDocument();
- console.error = originalError;
});
it('renders with radio type', () => {
render();