implement basic react testing suite

This commit is contained in:
Elliot DeNolf
2020-10-07 17:20:10 -04:00
parent 6381d4cf6b
commit 64fef7d380
4 changed files with 153 additions and 9 deletions

14
src/client/client.spec.js Normal file
View File

@@ -0,0 +1,14 @@
import '@testing-library/jest-dom/extend-expect';
import React from 'react';
import { render } from '@testing-library/react';
import Separator from './components/elements/Paginator/Separator';
describe('Components', () => {
describe('Paginator', () => {
it('separator - renders dash', () => {
const { getByText } = render(<Separator />);
const linkElement = getByText(/—/i); // &mdash;
expect(linkElement).toBeInTheDocument();
});
});
});