2019-11-20 00:06:56 +00:00
|
|
|
import React from 'react';
|
|
|
|
import ReactDOM from 'react-dom';
|
|
|
|
import App from './App';
|
2019-11-26 04:35:46 +00:00
|
|
|
import renderer from 'react-test-renderer';
|
|
|
|
import { exportAllDeclaration } from '@babel/types';
|
|
|
|
import {render} from '@testing-library/react';
|
|
|
|
import extendExpect from '@testing-library/jest-dom/extend-expect'
|
2019-11-20 00:06:56 +00:00
|
|
|
|
|
|
|
it('renders without crashing', () => {
|
|
|
|
const div = document.createElement('div');
|
|
|
|
ReactDOM.render(<App />, div);
|
|
|
|
ReactDOM.unmountComponentAtNode(div);
|
|
|
|
});
|
2019-11-26 04:35:46 +00:00
|
|
|
|
|
|
|
describe('App', () => {
|
|
|
|
it('renders the correct title', () => {
|
|
|
|
const { getByTestId } = render(<App />);
|
|
|
|
expect(getByTestId('App')).toHaveTextContent('Phono Change Applier');
|
|
|
|
})
|
|
|
|
})
|