diff --git a/.all-contributorsrc b/.all-contributorsrc
index e6246601..7d0b3369 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -503,6 +503,15 @@
"code",
"doc"
]
+ },
+ {
+ "login": "Enikol",
+ "name": "Kate",
+ "avatar_url": "https://avatars3.githubusercontent.com/u/19998290?v=4",
+ "profile": "https://github.com/Enikol",
+ "contributions": [
+ "doc"
+ ]
}
]
}
diff --git a/README.md b/README.md
index 8df34b3b..e8c498fe 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@
[![version][version-badge]][package] [![downloads][downloads-badge]][npmtrends]
[![MIT License][license-badge]][license]
-[](#contributors)
+[](#contributors)
[![PRs Welcome][prs-badge]][prs] [![Code of Conduct][coc-badge]][coc]
[![Join the community on Spectrum][spectrum-badge]][spectrum]
@@ -628,6 +628,17 @@ fireEvent.change(comment, {
})
```
+Note that if you want to trigger `onChange` handler on a checkbox, you should
+fire a `click` event instead of `change`.
+
+```javascript
+import {render, fireEvent} from 'react-testing-library'
+
+const {getByLabelText} = render()
+
+fireEvent.click(getByLabelText('Checkbox'))
+```
+
### `waitForElement`
> [Read full docs from `dom-testing-library`](https://github.com/kentcdodds/dom-testing-library/blob/master/README.md#waitforelement)
@@ -1140,7 +1151,7 @@ Thanks goes to these people ([emoji key][emojis]):
| [
Richard Kotze (mobile)](http://www.richardkotze.com)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=rkotze "Documentation") | [
Brahian E. Soto Mercedes](https://github.com/sotobuild)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=sotobuild "Documentation") | [
Benoit de La Forest](https://github.com/bdelaforest)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=bdelaforest "Documentation") | [
Salah](https://github.com/thesalah)
[π»](https://github.com/kentcdodds/react-testing-library/commits?author=thesalah "Code") [β οΈ](https://github.com/kentcdodds/react-testing-library/commits?author=thesalah "Tests") | [
Adam Gordon](http://gordonizer.com)
[π](https://github.com/kentcdodds/react-testing-library/issues?q=author%3Aicfantv "Bug reports") [π»](https://github.com/kentcdodds/react-testing-library/commits?author=icfantv "Code") | [
Matija MarohniΔ](https://silvenon.com)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=silvenon "Documentation") | [
Justice Mba](https://github.com/Dajust)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=Dajust "Documentation") |
| [
Mark Pollmann](https://markpollmann.com/)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=MarkPollmann "Documentation") | [
Ehtesham Kafeel](https://github.com/ehteshamkafeel)
[π»](https://github.com/kentcdodds/react-testing-library/commits?author=ehteshamkafeel "Code") [π](https://github.com/kentcdodds/react-testing-library/commits?author=ehteshamkafeel "Documentation") | [
Julio PavΓ³n](http://jpavon.com)
[π»](https://github.com/kentcdodds/react-testing-library/commits?author=jpavon "Code") | [
Duncan L](http://www.duncanleung.com/)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=duncanleung "Documentation") [π‘](#example-duncanleung "Examples") | [
Tiago Almeida](https://www.linkedin.com/in/tyagow/?locale=en_US)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=tyagow "Documentation") | [
Robert Smith](http://rbrtsmith.com/)
[π](https://github.com/kentcdodds/react-testing-library/issues?q=author%3Arbrtsmith "Bug reports") | [
Zach Green](https://offbyone.tech)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=zgreen "Documentation") |
| [
dadamssg](https://github.com/dadamssg)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=dadamssg "Documentation") | [
Yazan Aabed](https://www.yaabed.com/)
[π](#blog-YazanAabeed "Blogposts") | [
Tim](https://github.com/timbonicus)
[π](https://github.com/kentcdodds/react-testing-library/issues?q=author%3Atimbonicus "Bug reports") [π»](https://github.com/kentcdodds/react-testing-library/commits?author=timbonicus "Code") [π](https://github.com/kentcdodds/react-testing-library/commits?author=timbonicus "Documentation") [β οΈ](https://github.com/kentcdodds/react-testing-library/commits?author=timbonicus "Tests") | [
Divyanshu Maithani](http://divyanshu.xyz)
[β
](#tutorial-divyanshu013 "Tutorials") [πΉ](#video-divyanshu013 "Videos") | [
Deepak Grover](https://www.linkedin.com/in/metagrover)
[β
](#tutorial-metagrover "Tutorials") [πΉ](#video-metagrover "Videos") | [
Eyal Cohen](https://github.com/eyalcohen4)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=eyalcohen4 "Documentation") | [
Peter Makowski](https://github.com/petermakowski)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=petermakowski "Documentation") |
-| [
Michiel Nuyts](https://github.com/Michielnuyts)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=Michielnuyts "Documentation") | [
Joe Ng'ethe](https://github.com/joeynimu)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=joeynimu "Documentation") |
+| [
Michiel Nuyts](https://github.com/Michielnuyts)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=Michielnuyts "Documentation") | [
Joe Ng'ethe](https://github.com/joeynimu)
[π»](https://github.com/kentcdodds/react-testing-library/commits?author=joeynimu "Code") [π](https://github.com/kentcdodds/react-testing-library/commits?author=joeynimu "Documentation") | [
Kate](https://github.com/Enikol)
[π](https://github.com/kentcdodds/react-testing-library/commits?author=Enikol "Documentation") |