testing-library / react-testing-library

🐐 Simple and complete React DOM testing utilities that encourage good testing practices.
https://testing-library.com/react
MIT License
18.84k stars 1.09k forks source link

Regression: Options not available in `renderHook` #1307

Closed icatalina closed 2 months ago

icatalina commented 2 months ago

Relevant code or config:

import { renderHook } from '@testing-library/react';

renderHook(() => null, { wrapper: () => null });

What you did:

Trying to use a wrapper on renderHook.

What happened:

image

Reproduction:

https://stackblitz.com/edit/rtl-template-emaqfx?file=src%2FApp.test.tsx

Problem description:

Only initialProps is available when using renderHook

Suggested solution:

🤷

icatalina commented 2 months ago

cc: @eps1lon

eps1lon commented 2 months ago

Thank you for the report. Should be fixed with @testing-library/react@15.0.4

icatalina commented 2 months ago

thanks heaps for the prompt response 🙇‍♀️