Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: testing-library/react-testing-library
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v11.0.1
Choose a base ref
...
head repository: testing-library/react-testing-library
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 3,215 additions and 930 deletions.
  1. +227 −2 .all-contributorsrc
  2. +3 −1 .codesandbox/ci.json
  3. +2 −1 .github/ISSUE_TEMPLATE.md
  4. +2 −7 .github/ISSUE_TEMPLATE/Bug_Report.md
  5. +1 −1 .github/ISSUE_TEMPLATE/Question.md
  6. +1 −1 .github/PULL_REQUEST_TEMPLATE.md
  7. +117 −0 .github/workflows/validate.yml
  8. +1 −1 .npmrc
  9. +0 −36 .travis.yml
  10. +11 −12 CONTRIBUTING.md
  11. +1 −1 LICENSE
  12. +234 −189 README.md
  13. +20 −0 codecov.yml
  14. +19 −0 jest.config.js
  15. +5 −5 other/MAINTAINING.md
  16. BIN other/cheat-sheet.pdf
  17. BIN other/design files/cheat-sheet.afpub
  18. +43 −16 package.json
  19. +1 −1 src/__tests__/__snapshots__/render.js.snap
  20. +26 −2 src/__tests__/act.js
  21. +1 −1 src/__tests__/auto-cleanup-skip.js
  22. +1 −1 src/__tests__/auto-cleanup.js
  23. +9 −6 src/__tests__/cleanup.js
  24. +66 −0 src/__tests__/config.js
  25. +4 −5 src/__tests__/debug.js
  26. +233 −36 src/__tests__/end-to-end.js
  27. +183 −0 src/__tests__/error-handlers.js
  28. +18 −2 src/__tests__/events.js
  29. +1 −1 src/__tests__/multi-base.js
  30. +16 −13 src/__tests__/new-act.js
  31. +0 −80 src/__tests__/no-act.js
  32. +0 −142 src/__tests__/old-act.js
  33. +281 −85 src/__tests__/render.js
  34. +141 −0 src/__tests__/renderHook.js
  35. +91 −24 src/__tests__/rerender.js
  36. +1 −4 src/__tests__/stopwatch.js
  37. +75 −119 src/act-compat.js
  38. +34 −0 src/config.js
  39. +11 −0 src/fire-event.js
  40. +21 −5 src/index.js
  41. +285 −48 src/pure.js
  42. +129 −0 tests/failOnUnexpectedConsoleCalls.js
  43. +8 −0 tests/setup-env.js
  44. +52 −0 tests/shouldIgnoreConsoleError.js
  45. +303 −0 tests/toWarnDev.js
  46. +258 −30 types/index.d.ts
  47. +274 −27 types/test.tsx
  48. +5 −16 types/tsconfig.json
  49. +0 −9 types/tslint.json
229 changes: 227 additions & 2 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -876,7 +876,8 @@
"profile": "https://nickmccurdy.com/",
"contributions": [
"review",
"question"
"question",
"infra"
]
},
{
@@ -1158,8 +1159,232 @@
"contributions": [
"doc"
]
},
{
"login": "artem-malko",
"name": "Artem Malko",
"avatar_url": "https://avatars0.githubusercontent.com/u/1823689?v=4",
"profile": "http://artmalko.ru",
"contributions": [
"code"
]
},
{
"login": "ljosberinn",
"name": "Gerrit Alex",
"avatar_url": "https://avatars1.githubusercontent.com/u/29307652?v=4",
"profile": "http://gerritalex.de",
"contributions": [
"code"
]
},
{
"login": "karthick3018",
"name": "Karthick Raja",
"avatar_url": "https://avatars1.githubusercontent.com/u/47154512?v=4",
"profile": "https://github.com/karthick3018",
"contributions": [
"code"
]
},
{
"login": "theashraf",
"name": "Abdelrahman Ashraf",
"avatar_url": "https://avatars1.githubusercontent.com/u/39750790?v=4",
"profile": "https://github.com/theashraf",
"contributions": [
"code"
]
},
{
"login": "lidoravitan",
"name": "Lidor Avitan",
"avatar_url": "https://avatars0.githubusercontent.com/u/35113398?v=4",
"profile": "https://github.com/lidoravitan",
"contributions": [
"doc"
]
},
{
"login": "ljharb",
"name": "Jordan Harband",
"avatar_url": "https://avatars1.githubusercontent.com/u/45469?v=4",
"profile": "https://github.com/ljharb",
"contributions": [
"review",
"ideas"
]
},
{
"login": "marcosvega91",
"name": "Marco Moretti",
"avatar_url": "https://avatars2.githubusercontent.com/u/5365582?v=4",
"profile": "https://github.com/marcosvega91",
"contributions": [
"code"
]
},
{
"login": "sanchit121",
"name": "sanchit121",
"avatar_url": "https://avatars2.githubusercontent.com/u/30828115?v=4",
"profile": "https://github.com/sanchit121",
"contributions": [
"bug",
"code"
]
},
{
"login": "solufa",
"name": "Solufa",
"avatar_url": "https://avatars.githubusercontent.com/u/9402912?v=4",
"profile": "https://github.com/solufa",
"contributions": [
"bug",
"code"
]
},
{
"login": "AriPerkkio",
"name": "Ari Perkkiö",
"avatar_url": "https://avatars.githubusercontent.com/u/14806298?v=4",
"profile": "https://codepen.io/ariperkkio/",
"contributions": [
"test"
]
},
{
"login": "jhnns",
"name": "Johannes Ewald",
"avatar_url": "https://avatars.githubusercontent.com/u/781746?v=4",
"profile": "https://github.com/jhnns",
"contributions": [
"code"
]
},
{
"login": "anpaopao",
"name": "Angus J. Pope",
"avatar_url": "https://avatars.githubusercontent.com/u/44686792?v=4",
"profile": "https://github.com/anpaopao",
"contributions": [
"doc"
]
},
{
"login": "leschdom",
"name": "Dominik Lesch",
"avatar_url": "https://avatars.githubusercontent.com/u/62334278?v=4",
"profile": "https://github.com/leschdom",
"contributions": [
"doc"
]
},
{
"login": "ImADrafter",
"name": "Marcos Gómez",
"avatar_url": "https://avatars.githubusercontent.com/u/44379989?v=4",
"profile": "https://github.com/ImADrafter",
"contributions": [
"doc"
]
},
{
"login": "akashshyamdev",
"name": "Akash Shyam",
"avatar_url": "https://avatars.githubusercontent.com/u/56759828?v=4",
"profile": "https://www.akashshyam.online/",
"contributions": [
"bug"
]
},
{
"login": "fmeum",
"name": "Fabian Meumertzheim",
"avatar_url": "https://avatars.githubusercontent.com/u/4312191?v=4",
"profile": "https://hen.ne.ke",
"contributions": [
"code",
"bug"
]
},
{
"login": "Nokel81",
"name": "Sebastian Malton",
"avatar_url": "https://avatars.githubusercontent.com/u/8225332?v=4",
"profile": "https://github.com/Nokel81",
"contributions": [
"bug",
"code"
]
},
{
"login": "mboettcher",
"name": "Martin Böttcher",
"avatar_url": "https://avatars.githubusercontent.com/u/2325337?v=4",
"profile": "https://github.com/mboettcher",
"contributions": [
"code"
]
},
{
"login": "TkDodo",
"name": "Dominik Dorfmeister",
"avatar_url": "https://avatars.githubusercontent.com/u/1021430?v=4",
"profile": "http://tkdodo.eu",
"contributions": [
"code"
]
},
{
"login": "stephensauceda",
"name": "Stephen Sauceda",
"avatar_url": "https://avatars.githubusercontent.com/u/1017723?v=4",
"profile": "https://stephensauceda.com",
"contributions": [
"doc"
]
},
{
"login": "cmdcolin",
"name": "Colin Diesh",
"avatar_url": "https://avatars.githubusercontent.com/u/6511937?v=4",
"profile": "http://cmdcolin.github.io",
"contributions": [
"doc"
]
},
{
"login": "yinm",
"name": "Yusuke Iinuma",
"avatar_url": "https://avatars.githubusercontent.com/u/13295106?v=4",
"profile": "http://yinm.info",
"contributions": [
"code"
]
},
{
"login": "trappar",
"name": "Jeff Way",
"avatar_url": "https://avatars.githubusercontent.com/u/525726?v=4",
"profile": "https://github.com/trappar",
"contributions": [
"code"
]
},
{
"login": "bernardobelchior",
"name": "Bernardo Belchior",
"avatar_url": "https://avatars.githubusercontent.com/u/12778398?v=4",
"profile": "http://belchior.me",
"contributions": [
"code",
"doc"
]
}
],
"contributorsPerLine": 7,
"repoHost": "https://github.com"
"repoHost": "https://github.com",
"commitType": "docs",
"commitConvention": "angular"
}
4 changes: 3 additions & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"sandboxes": ["new", "github/kentcdodds/react-testing-library-examples"]
"installCommand": "install:csb",
"sandboxes": ["new", "github/kentcdodds/react-testing-library-examples"],
"node": "18"
}
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ Thanks for your interest in the project. We appreciate bugs filed and PRs submit
instead of filing an issue on GitHub. You can follow the instructions in this
codesandbox to make a reproduction of your issue: https://kcd.im/rtl-help
* Discord
https://discord.gg/c6JN9fM
https://discord.gg/testing-library
* Stack Overflow
https://stackoverflow.com/questions/tagged/react-testing-library
@@ -61,6 +61,7 @@ for the supported version.
Relevant code or config

```javascript

```

What you did:
9 changes: 2 additions & 7 deletions .github/ISSUE_TEMPLATE/Bug_Report.md
Original file line number Diff line number Diff line change
@@ -60,13 +60,8 @@ https://github.com/testing-library/testing-library-docs
### Reproduction:

<!--
If possible, please create a repository that reproduces the issue with the
minimal amount of code possible.
Template repo: https://github.com/testing-library/dom-testing-library-template
Or if you can, try to reproduce the issue in a Codesandbox. You can fork the one
here: https://codesandbox.io/s/5z6x4r7n0p
If possible, please try to reproduce this issue in Stackblitz. You can fork the one
here: https://testing-library.com/new-rtl
-->

### Problem description:
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Question.md
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ For questions related to using the library, please visit a support community
instead of filing an issue on GitHub. You can follow the instructions in this
codesandbox to make a reproduction of your issue: https://kcd.im/rtl-help

- Discord https://discord.gg/c6JN9fM
- Discord https://discord.gg/testing-library
- Stack Overflow
https://stackoverflow.com/questions/tagged/react-testing-library
- Documentation: https://github.com/testing-library/testing-library-docs
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ merge of your pull request!
- [ ] Documentation added to the
[docs site](https://github.com/testing-library/testing-library-docs)
- [ ] Tests
- [ ] Typescript definitions updated
- [ ] TypeScript definitions updated
- [ ] Ready to be merged
<!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->

Loading