react-testing-library
Advanced tools
Comparing version
{ | ||
"name": "react-testing-library", | ||
"version": "4.1.2", | ||
"version": "4.1.3", | ||
"description": "Simple and complete React DOM testing utilities that encourage good testing practices.", | ||
@@ -40,3 +40,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"dom-testing-library": "^2.6.0", | ||
"dom-testing-library": "^3.0.1", | ||
"wait-for-expect": "^1.0.0" | ||
@@ -43,0 +43,0 @@ }, |
@@ -18,3 +18,3 @@ <div align="center"> | ||
[](#contributors) | ||
[](#contributors) | ||
[![PRs Welcome][prs-badge]][prs] [![Code of Conduct][coc-badge]][coc] | ||
@@ -196,2 +196,13 @@ [![Join the community on Spectrum][spectrum-badge]][spectrum] | ||
For Example: If you are unit testing a `tablebody` element, it cannot be a child | ||
of a `div`. In this case, you can specify a `table` as the render `container`. | ||
```javascript | ||
const table = document.createElement('table') | ||
const {container} = render(<TableBody {...props} />, { | ||
container: document.body.appendChild(table), | ||
}) | ||
``` | ||
**baseElement**: If the `container` is specified, then this defaults to that, | ||
@@ -669,2 +680,4 @@ otherwise this defaults to `document.documentElement`. This is used as the base | ||
- [Migrating from Enzyme shallow rendering to explicit component mocks](https://www.youtube.com/watch?v=LHUdxkThTM0&list=PLV5CVI1eNcJgCrPH_e6d57KRUTiDZgs0u) | ||
- [Confident React](https://www.youtube.com/watch?v=qXRPHRgcXJ0&list=PLV5CVI1eNcJgNqzNwcs4UKrlJdhfDjshf) | ||
@@ -965,3 +978,3 @@ - [Test Driven Development with react-testing-library](https://www.youtube.com/watch?v=kCR3JAR7CHE&list=PLV5CVI1eNcJgCrPH_e6d57KRUTiDZgs0u) | ||
| [<img src="https://avatars2.githubusercontent.com/u/10452163?v=4" width="100px;"/><br /><sub><b>Richard Kotze (mobile)</b></sub>](http://www.richardkotze.com)<br />[π](https://github.com/kentcdodds/react-testing-library/commits?author=rkotze "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/10819833?v=4" width="100px;"/><br /><sub><b>Brahian E. Soto Mercedes</b></sub>](https://github.com/sotobuild)<br />[π](https://github.com/kentcdodds/react-testing-library/commits?author=sotobuild "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/7151559?v=4" width="100px;"/><br /><sub><b>Benoit de La Forest</b></sub>](https://github.com/bdelaforest)<br />[π](https://github.com/kentcdodds/react-testing-library/commits?author=bdelaforest "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/6624197?v=4" width="100px;"/><br /><sub><b>Salah</b></sub>](https://github.com/thesalah)<br />[π»](https://github.com/kentcdodds/react-testing-library/commits?author=thesalah "Code") [β οΈ](https://github.com/kentcdodds/react-testing-library/commits?author=thesalah "Tests") | [<img src="https://avatars2.githubusercontent.com/u/370054?v=4" width="100px;"/><br /><sub><b>Adam Gordon</b></sub>](http://gordonizer.com)<br />[π](https://github.com/kentcdodds/react-testing-library/issues?q=author%3Aicfantv "Bug reports") [π»](https://github.com/kentcdodds/react-testing-library/commits?author=icfantv "Code") | [<img src="https://avatars2.githubusercontent.com/u/471278?v=4" width="100px;"/><br /><sub><b>Matija MarohniΔ</b></sub>](https://silvenon.com)<br />[π](https://github.com/kentcdodds/react-testing-library/commits?author=silvenon "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/8015514?v=4" width="100px;"/><br /><sub><b>Justice Mba</b></sub>](https://github.com/Dajust)<br />[π](https://github.com/kentcdodds/react-testing-library/commits?author=Dajust "Documentation") | | ||
| [<img src="https://avatars2.githubusercontent.com/u/5286559?v=4" width="100px;"/><br /><sub><b>Mark Pollmann</b></sub>](https://markpollmann.com/)<br />[π](https://github.com/kentcdodds/react-testing-library/commits?author=MarkPollmann "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/1213123?v=4" width="100px;"/><br /><sub><b>Ehtesham Kafeel</b></sub>](https://github.com/ehteshamkafeel)<br />[π»](https://github.com/kentcdodds/react-testing-library/commits?author=ehteshamkafeel "Code") [π](https://github.com/kentcdodds/react-testing-library/commits?author=ehteshamkafeel "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/1493505?v=4" width="100px;"/><br /><sub><b>Julio PavΓ³n</b></sub>](http://jpavon.com)<br />[π»](https://github.com/kentcdodds/react-testing-library/commits?author=jpavon "Code") | | ||
| [<img src="https://avatars2.githubusercontent.com/u/5286559?v=4" width="100px;"/><br /><sub><b>Mark Pollmann</b></sub>](https://markpollmann.com/)<br />[π](https://github.com/kentcdodds/react-testing-library/commits?author=MarkPollmann "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/1213123?v=4" width="100px;"/><br /><sub><b>Ehtesham Kafeel</b></sub>](https://github.com/ehteshamkafeel)<br />[π»](https://github.com/kentcdodds/react-testing-library/commits?author=ehteshamkafeel "Code") [π](https://github.com/kentcdodds/react-testing-library/commits?author=ehteshamkafeel "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/1493505?v=4" width="100px;"/><br /><sub><b>Julio PavΓ³n</b></sub>](http://jpavon.com)<br />[π»](https://github.com/kentcdodds/react-testing-library/commits?author=jpavon "Code") | [<img src="https://avatars3.githubusercontent.com/u/1765048?v=4" width="100px;"/><br /><sub><b>Duncan L</b></sub>](http://www.duncanleung.com/)<br />[π](https://github.com/kentcdodds/react-testing-library/commits?author=duncanleung "Documentation") [π‘](#example-duncanleung "Examples") | [<img src="https://avatars1.githubusercontent.com/u/700778?v=4" width="100px;"/><br /><sub><b>Tiago Almeida</b></sub>](https://www.linkedin.com/in/tyagow/?locale=en_US)<br />[π](https://github.com/kentcdodds/react-testing-library/commits?author=tyagow "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/4982001?v=4" width="100px;"/><br /><sub><b>Robert Smith</b></sub>](http://rbrtsmith.com/)<br />[π](https://github.com/kentcdodds/react-testing-library/issues?q=author%3Arbrtsmith "Bug reports") | | ||
@@ -968,0 +981,0 @@ <!-- ALL-CONTRIBUTORS-LIST:END --> |
60119
2.23%1057
1.25%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated