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
feat: add support for request params in mock client #1466
Conversation
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.
good work! Docs are missing!
@mcollina Done! |
Codecov Report
@@ Coverage Diff @@
## main #1466 +/- ##
=======================================
Coverage 94.52% 94.52%
=======================================
Files 49 49
Lines 4271 4276 +5
=======================================
+ Hits 4037 4042 +5
Misses 234 234
Continue to review full report at Codecov.
|
@@ -50,6 +50,8 @@ declare namespace MockInterceptor { | |||
body?: string | RegExp | ((body: string) => boolean); | |||
/** Headers to intercept on. */ | |||
headers?: Record<string, string | RegExp | ((body: string) => boolean)> | ((headers: Record<string, string>) => boolean); | |||
/** Query params to intercept on */ | |||
query?: Record<string, any>; |
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.
please add a test for this type
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.
Done!
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.
lgtm
@mcollina Thank you! Would it be feasible to release a new version next week? New query param functionality is not very compatible with tests without this piece. |
refs #1448