Skip to content
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

Merged
merged 6 commits into from
Aug 30, 2021

Conversation

GiordanoArman
Copy link
Contributor

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!

Copy link
Owner

@eugef eugef left a 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)

@GiordanoArman
Copy link
Contributor Author

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 :)

Copy link
Owner

@eugef eugef left a 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

@eugef eugef merged commit a0ad193 into eugef:master Aug 30, 2021
@eprev
Copy link

eprev commented Nov 4, 2022

Looks like this wasn't published in the end? 1.11 does not contain these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants