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(route2): fixed the issue with not being able to await a request body when providing static response stub #9059
fix(route2): fixed the issue with not being able to await a request body when providing static response stub #9059
Conversation
Thanks for taking the time to open a PR!
|
|
||
return sendStaticResponse(request.res, route.staticResponse, request.onResponse!) | ||
} | ||
|
||
const ensureBody = (cb: () => void) => { |
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.
right now every branch of the code that follows this declaration is using both ensureBody
& emitReceived
, so maybe you'd like to have this refactored somehow? If yes - let me know if you have anything in particular in mind. A change is not needed that much as the code is readable but maybe it would be good to ensure that both of those things will always be called for this logic rather if some new branches get added?
…iding static response stub
0baf436
to
f28c601
Compare
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.
This looks good @Andarist, thanks for the PR. Don't worry about the refactor for now.
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
User facing changelog
Fixed an issue with not being able to await a request body when providing static response stub and using the
experimentalNetworkStubbing
.Additional details
It's a bug fix.
experimentalNetworkStubbing
How has the user experience changed?
N/A
PR Tasks