Fix mock middleware types#822
Merged
Merged
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.
|
matt-gadd
requested changes
Jul 21, 2020
agubler
approved these changes
Jul 21, 2020
Member
agubler
left a comment
There was a problem hiding this comment.
One small thing, I think there is a DefaultMiddlewareFactory type that you could use instead of MiddlewareResult<any, any, any, any>
tomdye
pushed a commit
to tomdye/framework
that referenced
this pull request
Sep 23, 2020
Merged
tomdye
added a commit
that referenced
this pull request
Sep 23, 2020
* 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 <bmaier@sitepen.com> Co-authored-by: Anthony Gubler <agubler@sitepen.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type: bug
The following has been addressed in the PR:
prettieras per the readme code style guidelinesDescription:
Exclude<keyof X, 'Y'>returns a unioned string type not the object type. Normally usingOmitorPickwould fix that but In the case of the MiddlewareResultFactory the type isneverbecuase the call signature isn't a key.This changes the mocked middleware type to the call signature itself.