File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
cra-template-typescript/template/src
cra-template/template/src Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import { render } from '@testing-library/react' ;
2+ import { render , screen } from '@testing-library/react' ;
33import App from './App' ;
44
55test ( 'renders learn react link' , ( ) => {
6- const { getByText } = render ( < App /> ) ;
7- const linkElement = getByText ( / l e a r n r e a c t / i) ;
6+ render ( < App /> ) ;
7+ const linkElement = screen . getByText ( / l e a r n r e a c t / i) ;
88 expect ( linkElement ) . toBeInTheDocument ( ) ;
99} ) ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import { render } from '@testing-library/react' ;
2+ import { render , screen } from '@testing-library/react' ;
33import App from './App' ;
44
55test ( 'renders learn react link' , ( ) => {
6- const { getByText } = render ( < App /> ) ;
7- const linkElement = getByText ( / l e a r n r e a c t / i) ;
6+ render ( < App /> ) ;
7+ const linkElement = screen . getByText ( / l e a r n r e a c t / i) ;
88 expect ( linkElement ) . toBeInTheDocument ( ) ;
99} ) ;
You can’t perform that action at this time.
0 commit comments