File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ import React from 'react'
2
+ import { render , screen } from '@testing-library/react'
3
+ // import '@testing-library/jest-dom'
4
+ import '@testing-library/jest-dom/extend-expect' // needed this to extend the jest-dom assertions (ex toHaveTextContent)
5
+ import MainContainer from '../containers/MainContainer'
6
+
7
+
8
+
9
+ test ( 'Main Container should render' , ( ) => {
10
+ render ( < MainContainer /> ) ;
11
+ screen . debug ( ) ;
12
+ } ) ;
13
+
14
+
15
+
16
+ // const Header = () => {
17
+ // return <h1 className='title'>I am a header</h1>
18
+ // };
19
+
20
+
21
+ // test('Test should run, header renders and it has correct stuff', () => {
22
+ // render(<Header />);
23
+ // // Extract header
24
+ // screen.debug();
25
+ // // allows the DOM to be rendered
26
+
27
+ // const header = screen.getByRole('heading');
28
+ // // Use jest-dom assertions
29
+ // expect(header).toBeInTheDocument();
30
+ // expect(header).toHaveTextContent('I am a header');
31
+ // expect(header).toHaveClass('title');
32
+ // });
You can’t perform that action at this time.
0 commit comments