Skip to content

Commit

Permalink
Merge branch 'main' into infra/codeowners
Browse files Browse the repository at this point in the history
  • Loading branch information
1Copenut authored Sep 19, 2023
2 parents 755d3f3 + ca5bf9a commit e026a41
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 e026a41

Please sign in to comment.