implement basic react testing suite
This commit is contained in:
14
src/client/client.spec.js
Normal file
14
src/client/client.spec.js
Normal 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); // —
|
||||
expect(linkElement).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user