-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Propagating events from EventEmmiter's that generate secondary events #9
Labels
Comments
Hi @pgte, any feedback on this issue? Thanks |
paulmelnikow
added a commit
that referenced
this issue
Apr 12, 2019
Thanks to @rbrtribeiro for the fix! This rebases the work from #8 and tests the return values directly (rather than adding a wide-bracket integration test). Close #8 Close #9
paulmelnikow
added a commit
that referenced
this issue
Apr 12, 2019
Thanks to @rbrtribeiro for the fix! This rebases the work from #8 with minor modifications, and tests the return values directly (rather than adding a wide-bracket integration test). Close #8 Close #9
paulmelnikow
added a commit
that referenced
this issue
Apr 12, 2019
Thanks to @rbrtribeiro for the fix! This rebases the work from #8 with minor modifications, and tests the return values directly (rather than adding a wide-bracket integration test). Close #8 Close #9
paulmelnikow
added a commit
that referenced
this issue
Apr 12, 2019
This rebases the work from #8 with minor modifications, and tests the return values directly (rather than adding a wide-bracket integration test). Adopts arrow functions in the test file. This was identified as the root cause of nock/nock#1485. Thanks to @rbrtribeiro for the fix! Close #8 Close #9
🎉 This issue has been resolved in version 2.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the expected behavior?
When propagating events from emitters such as
http.ClientRequest
(.e.gresponse
), we should be able to listen for the secondary events (e.g.data
event).What is the actual behavior?
The response object seems to be empty, so, for instance, data event is not emitted.
Possible solution
In the propagate function, the new source.emit function should propagate the return value of emiting the event in the destination emitter. If not, the node http module will dump the object. As stated in the node
_http_client.js
source code:If this interpretation is correct, PR submitted with a possible solution.
How to reproduce the issue
PR submitted with a new test case that reflects the issue.
Does the bug have a test case?
Submitted with PR
The text was updated successfully, but these errors were encountered: