Skip to content

[nock@14] Axios custom HTTPS agent is broken #2828

@ddolcimascolo

Description

@ddolcimascolo

Please avoid duplicates

Reproducible test case

https://github.com/ddolcimascolo/nock-axios-agent-issue

Nock Version

14

Node Version

22

TypeScript Version

No response

What happened?

Simply require-ing nock make the Axios request fail with the (expected) TLS error. The custom httpsAgent was ignored.
Comment out the require of nock and the request pass.

Additional info, I didn't even started to setup request interception with nock, it's just required.

Would you be interested in contributing a fix?

  • yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions