I'm trying to test this GOT http client. https://github.com/sindresorhus/got
They use a library that checks the socket is a TLSSocket.
socket instanceof TLSSocket
https://github.com/szmarczak/defer-to-connect/blob/41786a90bbcb2c3530d99b62b2c23b295274e761/source/index.ts#L29
Is there a way to get Nock to use a TLSSocket instead of a Socket?
I tried using "https://" protocol, but the Socket seen by the Got Client is not a TLSSocket
const mockReq = nock("https://localhost") .get("/test") .reply(200, { measure: "true" });
The Got client has timings for tls connection, but my test is not getting the tls timing due to Socket not being a TLSSocket.
I'm trying to test this GOT http client. https://github.com/sindresorhus/got
They use a library that checks the socket is a TLSSocket.
socket instanceof TLSSockethttps://github.com/szmarczak/defer-to-connect/blob/41786a90bbcb2c3530d99b62b2c23b295274e761/source/index.ts#L29
Is there a way to get Nock to use a TLSSocket instead of a Socket?
I tried using "https://" protocol, but the Socket seen by the Got Client is not a TLSSocket
const mockReq = nock("https://localhost") .get("/test") .reply(200, { measure: "true" });The Got client has timings for tls connection, but my test is not getting the tls timing due to Socket not being a TLSSocket.