Skip to content

Commit

Permalink
docs(getting-started): link react testing library documentation (#7110)
Browse files Browse the repository at this point in the history
* docs(getting-started): link react testing library documentation

* remove explicit reference to Jest where it doesn't make sense

* Update GETTING-STARTED.md

Co-authored-by: Jenny <[email protected]>

* Update GETTING-STARTED.md

Co-authored-by: Eric Olkowski <[email protected]>

Co-authored-by: Jenny <[email protected]>
Co-authored-by: Eric Olkowski <[email protected]>
  • Loading branch information
3 people authored Mar 25, 2022
1 parent 91da841 commit 045aedf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions GETTING-STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ When writing examples:

## Testing

PatternFly React currently uses [Jest](https://facebook.github.io/jest/) for running snapshot tests and [Cypress](https://www.cypress.io/) for running integration tests.
PatternFly React currently uses [Jest](https://facebook.github.io/jest/) with [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/) for running unit tests and [Cypress](https://www.cypress.io/) for running integration tests.

### Jest
### Jest + React Testing Library

Use Jest tests to capture how the DOM should look after rendering. Save Jest tests (`*.test.tsx` files) under a `__tests__` folder. The most commonly used test is to expect a rendered component to match a snapshot. You can run these with `yarn test`.
Use Jest and React Testing Library to capture how the DOM should look after rendering and verify that it functions as you expect. Save tests (`*.test.tsx` files) under a `__tests__` folder. A common test is to expect a rendered component to match a snapshot. You can run these with `yarn test`. You can find more information about React Testing Library as it pertains to this project and the standards we're following on our [React Testing Library Basics](https://github.com/patternfly/patternfly-react/wiki/React-Testing-Library-Basics,-Best-Practices,-and-Guidelines) wiki article.

### Cypress

Expand Down

0 comments on commit 045aedf

Please sign in to comment.