Skip to content
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

Merged
merged 2 commits into from
Sep 4, 2022

Conversation

TkDodo
Copy link
Contributor

@TkDodo TkDodo commented Sep 4, 2022

What:
allow passing of all render options to renderHook
this allows using options like legacyRoot as well

Why: As discussed here:

How:

renderHook uses render under the hood, but not all RenderOptions were allowed to pass - only wrapper was forwarded. This PR passes all other options to render 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:

  • Documentation added to the
    docs site
  • Tests
  • TypeScript definitions updated
  • Ready to be merged

this allows using options like `legacyRoot` as well
@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 4, 2022

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:

Sandbox Source
React Configuration
react-testing-library-examples Configuration

@codecov
Copy link

codecov bot commented Sep 4, 2022

Codecov Report

Merging #1118 (10dfd0e) into main (73ee9ba) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main     #1118   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          181       181           
  Branches        36        36           
=========================================
  Hits           181       181           
Flag Coverage Δ
experimental 100.00% <100.00%> (ø)
latest 100.00% <100.00%> (ø)
next 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pure.js 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@eps1lon eps1lon left a 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!

@eps1lon eps1lon merged commit 27a9584 into testing-library:main Sep 4, 2022
@eps1lon
Copy link
Member

eps1lon commented Sep 4, 2022

@all-contributors add @TkDodo for code

@allcontributors
Copy link
Contributor

@eps1lon

I've put up a pull request to add @TkDodo! 🎉

@github-actions
Copy link

github-actions bot commented Sep 4, 2022

🎉 This PR is included in version 13.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@TkDodo TkDodo deleted the feature/legacyroot-renderhook branch September 4, 2022 17:18
CrispyBaguette pushed a commit to CrispyBaguette/wasm-palette-converter that referenced this pull request Nov 8, 2024
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 (@&#8203;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 ([#&#8203;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 ([#&#8203;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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants