mirror of
https://github.com/denoland/deno.git
synced 2024-12-12 02:27:46 -05:00
fmt
This commit is contained in:
parent
2c60a4352d
commit
7c43c3c988
1 changed files with 97 additions and 89 deletions
|
@ -1030,15 +1030,16 @@ Deno.test(
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
Deno.test("[node/http] destroyed requests should not be sent", {
|
Deno.test(
|
||||||
ignore: true,
|
"[node/http] destroyed requests should not be sent",
|
||||||
}, async () => {
|
{ ignore: true },
|
||||||
|
async () => {
|
||||||
let receivedRequest = false;
|
let receivedRequest = false;
|
||||||
const server = Deno.serve(() => {
|
const server = Deno.serve(() => {
|
||||||
receivedRequest = true;
|
receivedRequest = true;
|
||||||
return new Response(null);
|
return new Response(null);
|
||||||
});
|
});
|
||||||
let receivedError = null
|
let receivedError = null;
|
||||||
const request = http.request(`http://localhost:${server.addr.port}/`);
|
const request = http.request(`http://localhost:${server.addr.port}/`);
|
||||||
request.destroy();
|
request.destroy();
|
||||||
request.end("hello");
|
request.end("hello");
|
||||||
|
@ -1049,7 +1050,8 @@ Deno.test("[node/http] destroyed requests should not be sent", {
|
||||||
assert(receivedError!.toString().contains("socket hung up"));
|
assert(receivedError!.toString().contains("socket hung up"));
|
||||||
assertEquals(receivedRequest, false);
|
assertEquals(receivedRequest, false);
|
||||||
await server.shutdown();
|
await server.shutdown();
|
||||||
});
|
},
|
||||||
|
);
|
||||||
|
|
||||||
Deno.test("[node/http] node:http exports globalAgent", async () => {
|
Deno.test("[node/http] node:http exports globalAgent", async () => {
|
||||||
const http = await import("node:http");
|
const http = await import("node:http");
|
||||||
|
@ -1358,7 +1360,12 @@ Deno.test("[node/http] client closing a streaming response doesn't terminate ser
|
||||||
clearInterval(interval!);
|
clearInterval(interval!);
|
||||||
});
|
});
|
||||||
|
|
||||||
Deno.test("[node/http] client closing a streaming request doesn't terminate server", { ignore: true }, async () => {
|
Deno.test(
|
||||||
|
"[node/http] client closing a streaming request doesn't terminate server",
|
||||||
|
{
|
||||||
|
ignore: true,
|
||||||
|
},
|
||||||
|
async () => {
|
||||||
let interval: number;
|
let interval: number;
|
||||||
let uploadedData = "";
|
let uploadedData = "";
|
||||||
let requestError: Error | null = null;
|
let requestError: Error | null = null;
|
||||||
|
@ -1436,7 +1443,8 @@ Deno.test("[node/http] client closing a streaming request doesn't terminate serv
|
||||||
server.close();
|
server.close();
|
||||||
assertEquals(server.listening, false);
|
assertEquals(server.listening, false);
|
||||||
clearInterval(interval!);
|
clearInterval(interval!);
|
||||||
});
|
},
|
||||||
|
);
|
||||||
|
|
||||||
Deno.test("[node/http] http.request() post streaming body works", {
|
Deno.test("[node/http] http.request() post streaming body works", {
|
||||||
ignore: true,
|
ignore: true,
|
||||||
|
|
Loading…
Reference in a new issue