-
Notifications
You must be signed in to change notification settings - Fork 78
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 mock middleware types #822
Conversation
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 4e4cf01:
|
Codecov Report
@@ Coverage Diff @@
## master #822 +/- ##
==========================================
+ Coverage 97.53% 97.57% +0.03%
==========================================
Files 127 127
Lines 7964 7964
Branches 1836 1836
==========================================
+ Hits 7768 7771 +3
+ Misses 196 193 -3
Continue to review full report at Codecov.
|
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.
One small thing, I think there is a DefaultMiddlewareFactory
type that you could use instead of MiddlewareResult<any, any, any, any>
* Handle ignored children in decorate (#840) * Allow finding and modifying wrapped widgets in functional children (#780) * Add function to create "typed" version of middleware (#819) * Add factory function to middleware for adding types * change to withType * Fix mock middleware types (#822) * Wrap children result in an array if not already in one (#844) * wrap children result in an array if not already in one * add test for wrapped children * update assert render unit test (#820) Co-authored-by: Bradley Maier <[email protected]> Co-authored-by: Anthony Gubler <[email protected]>
Type: bug
The following has been addressed in the PR:
prettier
as per the readme code style guidelinesDescription:
Exclude<keyof X, 'Y'>
returns a unioned string type not the object type. Normally usingOmit
orPick
would fix that but In the case of the MiddlewareResultFactory the type isnever
becuase the call signature isn't a key.This changes the mocked middleware type to the call signature itself.