-
Notifications
You must be signed in to change notification settings - Fork 32
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
.pipe is not available in the response object #10
Comments
This is another symptom of issue #5, and issue is that sepia provides dummy request and response objects that don't have all the methods present in the original ones. I'll provide a fix where I add the |
I haven't tried to dig into Sepia's code yet, but http.ClientRequest is a subclass of a Stream. Couldn't the mock response also be implemented as a subclass of Stream? |
The request (which indeed has type I'm currently switching the mock response to be an |
Ok, I looked through how the node core library populated the |
@rstacruz: Sorry for the delay. I had to test the fix against an existing codebase that's still on node 0.8.x, which meant some conditional code to support both versions of node (0.8.x and 0.10.x). You should be able to update to 2.0.1. Note that if you're using 1.x currently, you'll want to check the release notes for 2.0.0, which was technically a backwards-incompatible change. Please let me know if there's any issue. |
awesome! |
In this code below,
res.pipe
is undefined whenVCR_MODE=cache
is declared. It is otherwise available when Sepia is not used.This breaks libraries such as then-request. then/then-request#12
The text was updated successfully, but these errors were encountered: