Skip to content

Commit

Permalink
[Doc] fix React Testing Library example (facebook#9245)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakit0 authored and abhiisheek committed May 19, 2023
1 parent b56413a commit 33113a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docusaurus/docs/running-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ Here's an example of using `react-testing-library` and `jest-dom` for testing th

```js
import React from 'react';
import { render } from '@testing-library/react';
import { render, screen } from '@testing-library/react';
import App from './App';

it('renders welcome message', () => {
const { getByText } = render(<App />);
expect(getByText('Learn React')).toBeInTheDocument();
render(<App />);
expect(screen.getByText('Learn React')).toBeInTheDocument();
});
```

Expand Down

0 comments on commit 33113a6

Please sign in to comment.