19 lines
464 B
TypeScript
19 lines
464 B
TypeScript
import React from 'react';
|
|
import { render, cleanup } from '@testing-library/react';
|
|
|
|
import App from '../components/App';
|
|
|
|
describe('App', () => {
|
|
|
|
afterEach(cleanup);
|
|
it('displays App component', () => {
|
|
const { getByText, getByRole } = render(<App />);
|
|
|
|
const title = getByText('Spoti Search');
|
|
const input = getByRole('searchbox', { name: 'Search by artist name' });
|
|
|
|
expect(title).toBeInTheDocument();
|
|
expect(input).toBeInTheDocument();
|
|
});
|
|
});
|