Skip to content

Commit 5066e17

Browse files
author
Kubit
committed
Add tests to dot component
1 parent 3f3dcd7 commit 5066e17

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/components/dot/__tests__/dot.test.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,16 @@ test('Should render Dot with plus simbol', async () => {
5959
expect(container).toHTMLValidate();
6060
expect(results).toHaveNoViolations();
6161
});
62+
63+
test('Get label', async () => {
64+
const { getByText, container } = renderProvider(
65+
<Dot {...mockMaxNumberProps} label="myLabel" number={undefined} />
66+
);
67+
68+
const dot = getByText('myLabel');
69+
70+
expect(dot).toBeInTheDocument();
71+
const results = await axe(container);
72+
expect(container).toHTMLValidate();
73+
expect(results).toHaveNoViolations();
74+
});

0 commit comments

Comments
 (0)