Closed
Description
https://codesandbox.io/s/async-surf-8ytrn?file=/src/hook.test.js
Here's a simplified example of a hook I'm using that makes an api call within the hook and also has some state management. Testing the hook from the outside, I have nothing to wrap in act
.
I've tried a few of the solutions https://kentcdodds.com/blog/fix-the-not-wrapped-in-act-warning and https://react-hooks-testing-library.com/reference/api#async-utilities but maybe I missed something.
Also the returned value isn't what I expect (it's still the default false). If I use the wait
async utils, what would I wait
for?