1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-05 13:59:01 -05:00

enable another case

This commit is contained in:
Yoshiya Hinosawa 2024-10-03 13:31:59 +09:00
parent cf6ae67a31
commit 8714e718bc
No known key found for this signature in database
GPG key ID: 9017DB4559488785
2 changed files with 31 additions and 33 deletions

View file

@ -703,16 +703,20 @@ function _lookupAndConnect(
} else {
self._unrefTimer();
defaultTriggerAsyncIdScope(
self[asyncIdSymbol],
_internalConnect,
self,
ip,
port,
addressType,
localAddress,
localPort,
);
defaultTriggerAsyncIdScope(self[asyncIdSymbol], nextTick, () => {
if (self.connecting) {
defaultTriggerAsyncIdScope(
self[asyncIdSymbol],
_internalConnect,
self,
ip,
port,
addressType,
localAddress,
localPort,
);
}
});
}
},
);

View file

@ -1074,30 +1074,24 @@ Deno.test("[node/https] node:https exports globalAgent", async () => {
);
});
Deno.test(
"[node/http] node:http request.setHeader(header, null) doesn't throw",
Deno.test("[node/http] node:http request.setHeader(header, null) doesn't throw", () => {
{
ignore: true,
},
() => {
{
const req = http.request("http://localhost:4545/");
req.on("error", () => {});
// @ts-expect-error - null is not a valid header value
req.setHeader("foo", null);
req.end();
req.destroy();
}
{
const req = https.request("https://localhost:4545/");
req.on("error", () => {});
// @ts-expect-error - null is not a valid header value
req.setHeader("foo", null);
req.end();
req.destroy();
}
},
);
const req = http.request("http://localhost:4545/");
req.on("error", () => {});
// @ts-expect-error - null is not a valid header value
req.setHeader("foo", null);
req.end();
req.destroy();
}
{
const req = https.request("https://localhost:4545/");
req.on("error", () => {});
// @ts-expect-error - null is not a valid header value
req.setHeader("foo", null);
req.end();
req.destroy();
}
});
Deno.test("[node/http] ServerResponse getHeader", async () => {
const { promise, resolve } = Promise.withResolvers<void>();