diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-04 18:46:05 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-04 18:46:05 +0200 |
| commit | e8bac61a7f0be6c60624b00e06ab8d00efc932f8 (patch) | |
| tree | 7b8920512e79edb006f3ff85c290f5ef0a9b1c3b /src/components/atoms/icons/plus-minus.test.tsx | |
| parent | 8a4fbf91b0ffdcb0ec38105f918ce6f90e6ec161 (diff) | |
chore: add a PlusMinus icon component
Diffstat (limited to 'src/components/atoms/icons/plus-minus.test.tsx')
| -rw-r--r-- | src/components/atoms/icons/plus-minus.test.tsx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/components/atoms/icons/plus-minus.test.tsx b/src/components/atoms/icons/plus-minus.test.tsx new file mode 100644 index 0000000..96c2ad0 --- /dev/null +++ b/src/components/atoms/icons/plus-minus.test.tsx @@ -0,0 +1,16 @@ +import { render, screen } from '@test-utils'; +import PlusMinus from './plus-minus'; + +describe('PlusMinus', () => { + it('renders a plus icon', () => { + render(<PlusMinus state="plus" ariaHidden={false} ariaLabel="Plus icon" />); + expect(screen.getByLabelText('Plus icon')).toHaveClass('icon--plus'); + }); + + it('renders a minus icon', () => { + render( + <PlusMinus state="minus" ariaHidden={false} ariaLabel="Minus icon" /> + ); + expect(screen.getByLabelText('Minus icon')).toHaveClass('icon--minus'); + }); +}); |
