diff --git a/cli/tests/unit/fetch_test.ts b/cli/tests/unit/fetch_test.ts index d867955782..08689a2a0a 100644 --- a/cli/tests/unit/fetch_test.ts +++ b/cli/tests/unit/fetch_test.ts @@ -1532,34 +1532,24 @@ Deno.test( ); Deno.test( - { - permissions: { net: true, read: true }, - // Doesn't pass on linux CI for unknown reasons (works fine locally on linux) - ignore: Deno.build.os !== "darwin", - }, + { permissions: { net: true, read: true } }, async function fetchForceHttp1OnHttp2Server() { const client = Deno.createHttpClient({ http2: false, http1: true }); await assertRejects( () => fetch("http://localhost:5549/http_version", { client }), TypeError, - "invalid HTTP version parsed", ); client.close(); }, ); Deno.test( - { - permissions: { net: true, read: true }, - // Doesn't pass on linux CI for unknown reasons (works fine locally on linux) - ignore: Deno.build.os !== "darwin", - }, + { permissions: { net: true, read: true } }, async function fetchForceHttp2OnHttp1Server() { const client = Deno.createHttpClient({ http2: true, http1: false }); await assertRejects( () => fetch("http://localhost:5548/http_version", { client }), TypeError, - "stream closed because of a broken pipe", ); client.close(); }, diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index 8681cbd9b1..27d3af4cd4 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -826,9 +826,16 @@ declare namespace Deno { /** Set an optional timeout for idle sockets being kept-alive. * Set to false to disable the timeout. */ poolIdleTimeout?: number | false; - /** Whether HTTP/1.1 is allowed or not. */ + /** + * Whether HTTP/1.1 is allowed or not. + * + * @default {true} + */ http1?: boolean; - /** Whether HTTP/2 is allowed or not. */ + /** Whether HTTP/2 is allowed or not. + * + * @default {true} + */ http2?: boolean; }