Open david718 opened 3 years ago
Hmm, we'll check it out.
@mpeyper Thanks for looking into it. Has there been any follow up? The above example is a copy of whats currently on the official testing-library example. I'm running into the same issue with the following versioning:
react
: 18.2.0@testing-library/react-hooks
: 8.0.1react-dom
: 18.2.0react-test-renderer
: 18.2.0node
: 16.19.0yarn
: 1.22.21Hi @rharrigan-sugarcrm, honestly probably not and if I did look then I don’t remember.
In your case though, if you are using React 18 you should be using renderHook
from @testing-library/react
instead of @testing-library/react/hooks
now. Let them know if you are still having issues after you migrate to the new API.
react-hooks-testing-library
version: 7.0.1react
version: 17.0.2react-dom
version (if applicable): 17.0.2react-test-renderer
version (if applicable): 17.0.2node
version: 15.13.10npm
(oryarn
) version: 1.22.10(yarn)Relevant code or config:
useCounter.ts
useCounter.test.ts
What you did:
I just follow the code in react testing library hooks docs.
and yarn test
What happened:
when yarn test, I got this error
Reproduction:
Problem description:
I could not move forward anymore.
Suggested solution: