-
Notifications
You must be signed in to change notification settings - Fork 31
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
fix: makeApiContextWrapper and createMockProxy #1312
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1312 +/- ##
=======================================
Coverage 45.95% 45.95%
=======================================
Files 492 493 +1
Lines 34374 34404 +30
Branches 8567 8580 +13
=======================================
+ Hits 15795 15811 +16
- Misses 18528 18542 +14
Partials 51 51
Flags with carried forward coverage won't be shown. Click here to find out more.
|
}: { | ||
children?: ReactNode; | ||
}, | ||
_ref |
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.
I wonder what's the root cause of the issue? Why does renderHook
require the ref? _ref
argument isn't even passed anywhere, could this be a bug in renderHook
itself?
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.
I suspect it uses it internally for something but not sure
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.
nvm, I was wrong. Real cause of the original issue is that ref
needs to be excluded from the auto proxy
undefined
in jest matchers. Proxied mock methods now include a mockName() call to give clearer outputfixes #1311