render ProtoLang
This commit is contained in:
parent
0bc6a93bf1
commit
cb2696b5cd
1 changed files with 20 additions and 0 deletions
20
src/components/ProtoLang.test.js
Normal file
20
src/components/ProtoLang.test.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import ProtoLang from './ProtoLang';
|
||||
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'
|
||||
|
||||
it('renders without crashing', () => {
|
||||
const div = document.createElement('div');
|
||||
ReactDOM.render(<ProtoLang />, div);
|
||||
ReactDOM.unmountComponentAtNode(div);
|
||||
});
|
||||
|
||||
describe('ProtoLang', () => {
|
||||
it('renders the correct title', () => {
|
||||
const { getByTestId } = render(<ProtoLang />);
|
||||
expect(getByTestId('ProtoLang')).toHaveTextContent('Proto Language Lexicon');
|
||||
})
|
||||
})
|
Loading…
Reference in a new issue