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 committed Aug 1, 2020
1 parent 58db16b commit de27bcf
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 de27bcf

Please sign in to comment.