Skip to content

Commit

Permalink
test: switch line tests to react testing library (#1361)
Browse files Browse the repository at this point in the history
  • Loading branch information
lsprr authored Feb 27, 2024
1 parent 5d92f1e commit 6fb5887
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
14 changes: 0 additions & 14 deletions packages/react/__tests__/src/components/Line/index.js

This file was deleted.

16 changes: 16 additions & 0 deletions packages/react/src/components/Line/index.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react';
import { render } from '@testing-library/react';
import Line from './index';
import axe from '../../axe';

test('passes classNames through', () => {
const { container } = render(<Line className="baz" />);
expect(container.firstChild).toHaveClass('Line', 'baz');
});

test('should return no axe violations', async () => {
const { container } = render(<Line />);

const results = await axe(container);
expect(results).toHaveNoViolations();
});

0 comments on commit 6fb5887

Please sign in to comment.