-
Notifications
You must be signed in to change notification settings - Fork 136
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
mockResponse.end(): added callback triggering once end() logic has run. #248
mockResponse.end(): added callback triggering once end() logic has run. #248
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.
AFAIK this PR still doesn't solve your initial problem #6 (comment)
basically I needed the callback argument to be triggered by the mock response end() method :) |
…arameters() and moved it above mockResponse.end() assignment.
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.
Looks good to me
…k is provided as argument.
Looks like this wasn't published in the end? 1.11 does not contain these changes. |
Hi @eugef, thanks for the help. I added support for the various signatures of end() mentioned on the documentation https://nodejs.org/api/http.html#http_response_end_data_encoding_callback
response.end([data[, encoding]][, callback])
I hope my work is neat enough!