test: add checkbox test

This commit is contained in:
Sammy Teillet
2023-04-18 18:27:54 +02:00
parent 4d23390989
commit 3e09dab7fc
3 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,12 @@
import { render } from '@testing-library/react';
import { RegularCheckbox } from '../__stories__/Checkbox.stories';
it('Checks the NavItem renders', () => {
const { getByTestId } = render(<RegularCheckbox />);
expect(getByTestId('input-checkbox')).toHaveAttribute(
'name',
'selected-company-1',
);
});