From 64cfb6261777720562f90818d9153d2d1743143c Mon Sep 17 00:00:00 2001 From: Krzysztof_Lukawski Date: Wed, 23 Feb 2022 10:33:12 +0100 Subject: [PATCH] feature(text-input): add spec file --- src/ui/text-input/text-input.spec.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/ui/text-input/text-input.spec.tsx diff --git a/src/ui/text-input/text-input.spec.tsx b/src/ui/text-input/text-input.spec.tsx new file mode 100644 index 0000000..ad543eb --- /dev/null +++ b/src/ui/text-input/text-input.spec.tsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import { axe } from 'jest-axe'; + +import { TextInput } from './text-input.component'; + +describe('Text-Input', () => { + test('renders an accessible text-input', async () => { + const { container } = render( + + ); + + expect(screen.getByRole('textbox')).toBeInTheDocument(); + expect(await axe(container)).toHaveNoViolations(); + }); +});