Skip to content

Commit

Permalink
feature(text-input): add spec file
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztoflukawski committed Feb 23, 2022
1 parent 0b2bb5a commit 64cfb62
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/ui/text-input/text-input.spec.tsx
Original file line number Diff line number Diff line change
@@ -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(
<TextInput defaultValue="Test Value" aria-label="test-input" />
);

expect(screen.getByRole('textbox')).toBeInTheDocument();
expect(await axe(container)).toHaveNoViolations();
});
});

0 comments on commit 64cfb62

Please sign in to comment.