We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d449f9d commit 94c45f9Copy full SHA for 94c45f9
docusaurus/docs/running-tests.md
@@ -201,12 +201,12 @@ Here's an example of using `react-testing-library` and `jest-dom` for testing th
201
202
```js
203
import React from 'react';
204
-import { render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
205
import App from './App';
206
207
it('renders welcome message', () => {
208
- const { getByText } = render(<App />);
209
- expect(getByText('Learn React')).toBeInTheDocument();
+ render(<App />);
+ expect(screen.getByText('Learn React')).toBeInTheDocument();
210
});
211
```
212
0 commit comments