Skip to content

Commit 53bf43f

Browse files
committed
Clean up test utils
1 parent df28dee commit 53bf43f

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

test/test-utils.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import * as http from 'http';
1010
import * as https from 'https';
1111
import * as http2 from 'http2';
1212

13-
1413
import * as _ from 'lodash';
1514
import * as http2Wrapper from 'http2-wrapper';
1615
import * as CrossFetch from "cross-fetch";
@@ -65,8 +64,6 @@ process.on('unhandledRejection', (reason, promise) => {
6564
chai.use(chaiAsPromised);
6665
chai.use(chaiFetch);
6766

68-
export const AssertionError = chai.AssertionError;
69-
7067
function getGlobalFetch() {
7168
return {
7269
fetch: globalThis.fetch.bind(globalThis),
@@ -83,11 +80,7 @@ export const fetch = fetchImplementation.fetch;
8380
// All a bit convoluted, so we don't shadow the global vars,
8481
// and we can still use those to define these in the browser
8582
const headersImplementation = fetchImplementation.Headers;
86-
const requestImplementation = fetchImplementation.Request;
87-
const responseImplementation = fetchImplementation.Response;
8883
export { headersImplementation as Headers };
89-
export { requestImplementation as Request };
90-
export { responseImplementation as Response };
9184

9285
export const FormData = globalThis.FormData ?? FormDataPolyfill;
9386
export const File = globalThis.File ?? FilePolyfill;
@@ -298,11 +291,10 @@ export const nodeSatisfies = (range: string) =>
298291
isNode && semver.satisfies(process.version, range);
299292

300293
export const BROKEN_H1_OVER_H2_TUNNELLING = "^18.8";
301-
export const DEFAULT_KEEP_ALIVE = ">=19";
302-
export const FIXED_KEEP_ALIVE_BEHAVIOUR = ">=20";
303294
export const BROKEN_H2_OVER_H2_TUNNELLING = "~20.12"; // https://github.com/nodejs/node/issues/52344
304295
export const DEFAULT_REQ_HEADERS_DISABLED = "^22.13.0 || >=23.5.0";
305296

297+
const DEFAULT_KEEP_ALIVE = ">=19";
306298
export const defaultNodeConnectionHeader = nodeSatisfies(DEFAULT_KEEP_ALIVE)
307299
? 'keep-alive'
308300
: 'close';
@@ -348,7 +340,7 @@ export function getHttp2ResponseTrailers(req: http2.ClientHttp2Stream) {
348340
});
349341
}
350342

351-
export async function http2Request(
343+
async function http2Request(
352344
url: string,
353345
headers: {},
354346
requestBody = '',

0 commit comments

Comments
 (0)