Closed tonymet closed 4 years ago
Any plans to fix this?
Test case?
We are using replay to mock calls to a https endpoint.
On Node 9: DEBUG=replay gives no output and the real endpoint is hit. On Node 8: it works as expected.
Let me know if you need something more comprehensive but @tonymet has already given steps to reproduce above.
The issue is reproduceable following the steps in this repo: https://github.com/ostrgard/node-replay-bug. Node's http
and https
seems to work fine, but other fetching libraries have issues with https requests.
Adding HTTPS.request = HTTP.request;
to the end of src/patch_http_request.js
fixes this, but does fail some tests.
Hope this is of some help, @assaf.
I may be experiencing a similar issue with Node 10.6.0
I don't know when I'll have time to add test cases/steps to reproduce (I will try) but I wanted to put this on someone's radar. Maybe someone will beat me to it, and help solve this thing.
Hi Was wondering if there has been any progress made on this. We love using the library but ever seen moving to node 10, we are unable to add new tests. Any short term solution would be accepted too. We tried @ostrgard. solution but it didn't work out for us. Thanks in advance.
FYI , We have been able to get some progress by applying the suggestion here for supertest. https://github.com/assaf/node-replay/issues/147
+1
For the sake of others who end up on this thread, at least in my case, replay
works fine with axios
on Node 10. My problem was that replay
was ignoring requests to localhost
. (Solved by calling Replay.reset('localhost')
.)
It's hard to tell what's wrong if replay
doesn't record requests. It would be helpful if it would log a debug message for skipped requests.
It seems like there's a regression with HTTPS urls in Node 9 that's not there in node8. Here's an example test run
Steps to Repeat
Actual Results
Expected Results
the "matching https url" should pass, which would indicate working support for HTTPS requests.
Suspicions
Full Debug Output
Build Info