Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 79dbc33

Browse files
Update template tests (#8705)
1 parent d2f813f commit 79dbc33

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React from 'react';
2-
import { render } from '@testing-library/react';
2+
import { render, screen } from '@testing-library/react';
33
import App from './App';
44

55
test('renders learn react link', () => {
6-
const { getByText } = render(<App />);
7-
const linkElement = getByText(/learn react/i);
6+
render(<App />);
7+
const linkElement = screen.getByText(/learn react/i);
88
expect(linkElement).toBeInTheDocument();
99
});
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React from 'react';
2-
import { render } from '@testing-library/react';
2+
import { render, screen } from '@testing-library/react';
33
import App from './App';
44

55
test('renders learn react link', () => {
6-
const { getByText } = render(<App />);
7-
const linkElement = getByText(/learn react/i);
6+
render(<App />);
7+
const linkElement = screen.getByText(/learn react/i);
88
expect(linkElement).toBeInTheDocument();
99
});

0 commit comments

Comments
 (0)