Skip to content

Commit

Permalink
[wiki] RTL docs update (#7199)
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen authored Sep 19, 2023
1 parent 8688e09 commit ca5bf9a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wiki/contributing-to-eui/testing/unit-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ The [`src/test`](../../../src/test) module exports some functions and constants
* `shouldRenderCustomStyles` automatically asserts that consumer classNames, Emotion CSS, and custom styles are merged correctly with EUI's styles.
* RTL:
* The exports within `test/rtl` (`render`, `screen`, and `within`) provide out-of-the-box `data-test-subj` querying. `render` provides automatic `EuiProvider` wrapping.
* _Note:_ Unlike RTL's recommendation to [use `screen` for queries](https://testing-library.com/docs/queries/about/#using-queries), EUI prefers, for consistency, to destructure test queries from the `render()` API.
* Enzyme:
* `findTestSubject` helps you find DOM nodes in mounted components.
* `takeMountedSnapshot` generates a snapshot of a mounted component.
Expand Down

0 comments on commit ca5bf9a

Please sign in to comment.