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

MockAgent not compatible with ProxyAgent,EnvHttpProxyAgent,RetryAgent #3444

Closed
urugator opened this issue Aug 8, 2024 · 2 comments · Fixed by #3497
Closed

MockAgent not compatible with ProxyAgent,EnvHttpProxyAgent,RetryAgent #3444

urugator opened this issue Aug 8, 2024 · 2 comments · Fixed by #3497
Labels
bug Something isn't working Types Changes related to the TypeScript definitions

Comments

@urugator
Copy link

urugator commented Aug 8, 2024

Bug Description

ProxyAgent, EnvHttpProxyAgent, RetryAgent can't be passed to new MockAgent({ agent }), because they're missing closed and destroyed props.

Environment

Win 10, Node v20.13.1

Additional context

Not sure if I am approching this correctly, but I would like to handle non-itercepted requests exactly the same way as they would be by the app. So my assumption is that I am supposed to pass an agent used by my application to MockAgent and it will be used for non-intercepted requests.

@urugator urugator added the bug Something isn't working label Aug 8, 2024
@mcollina
Copy link
Member

mcollina commented Aug 9, 2024

Thanks for reporting!

Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that.

@Uzlopak
Copy link
Contributor

Uzlopak commented Aug 23, 2024

Could reproduce it... provided potential fix in #3497

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Types Changes related to the TypeScript definitions
Projects
None yet
3 participants