Skip to content

Commit c96cd4e

Browse files
author
Kent C. Dodds
authored
docs: add reference to why it's data-testid
1 parent ddbc409 commit c96cd4e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,10 @@ const usernameInputElement = getByTestId('username-input')
562562
</summary>
563563
564564
`getByTestId` is looking for the `data-testid` attribute and that's not going to
565-
change
565+
change. This follows the precident set by
566+
[React Native Web](https://github.com/kentcdodds/react-testing-library/issues/1)
567+
which uses a `testID` prop which emits a `data-testid` attribute on the element.
568+
566569
[#76](https://github.com/kentcdodds/dom-testing-library/issues/76#issuecomment-406321122)
567570
[#128](https://github.com/kentcdodds/dom-testing-library/issues/128)
568571
[#204](https://github.com/kentcdodds/react-testing-library/issues/204).

0 commit comments

Comments
 (0)