-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(renderHook): allow passing of all render options to renderHook #1118
feat(renderHook): allow passing of all render options to renderHook #1118
Conversation
this allows using options like `legacyRoot` as well
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 10dfd0e:
|
Codecov Report
@@ Coverage Diff @@
## main #1118 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 4
Lines 181 181
Branches 36 36
=========================================
Hits 181 181
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep works. Thanks for the test!
@all-contributors add @TkDodo for code |
I've put up a pull request to add @TkDodo! 🎉 |
🎉 This PR is included in version 13.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@testing-library/react](https://github.com/testing-library/react-testing-library) | dependencies | minor | [`13.2.0` -> `13.4.0`](https://renovatebot.com/diffs/npm/@testing-library%2freact/13.2.0/13.4.0) | --- ### Release Notes <details> <summary>testing-library/react-testing-library (@​testing-library/react)</summary> ### [`v13.4.0`](https://github.com/testing-library/react-testing-library/releases/tag/v13.4.0) [Compare Source](testing-library/react-testing-library@v13.3.0...v13.4.0) ##### Features - **renderHook:** allow passing of all render options to renderHook ([#​1118](testing-library/react-testing-library#1118)) ([27a9584](testing-library/react-testing-library@27a9584)) ### [`v13.3.0`](https://github.com/testing-library/react-testing-library/releases/tag/v13.3.0) [Compare Source](testing-library/react-testing-library@v13.2.0...v13.3.0) ##### Features - Use `globalThis` if available ([#​1070](testing-library/react-testing-library#1070)) ([c80809a](testing-library/react-testing-library@c80809a)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xNDIuNSIsInVwZGF0ZWRJblZlciI6IjM4LjE0Mi41IiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=--> Reviewed-on: https://gitea.bruyant.xyz/alexandre/PaletteSwitcher/pulls/46 Co-authored-by: Renovate <renovate@bruyant.xyz> Co-committed-by: Renovate <renovate@bruyant.xyz>
What:
allow passing of all render options to renderHook
this allows using options like
legacyRoot
as wellWhy: As discussed here:
How:
renderHook
usesrender
under the hood, but not allRenderOptions
were allowed to pass - onlywrapper
was forwarded. This PR passes all other options torender
as well.My intention was to allow
legacyRoot
, so if you want me to limit it to this option, I can also do that. I'm not sure if all options are worth forwarding or if there are some that don't make sense.docs site would still need to be updated - is this a separate repo / PR ?
Checklist:
docs site