@@ -12,7 +12,7 @@ import * as http from "node:http";
1212import concat from "concat-stream" ;
1313import * as async from "async" ;
1414import getPort from "../get-port" ;
15- import { describe , it , expect } from "vitest" ;
15+ import { describe , it , expect , beforeAll } from "vitest" ;
1616
1717describe ( "#deleteLength" , ( ) => {
1818 it ( "should change `content-length` for DELETE requests" , ( ) => {
@@ -95,7 +95,7 @@ function port(p: number | string) {
9595}
9696
9797describe ( "#createProxyServer.web() using own http server" , ( ) => {
98- it ( "gets some ports" , async ( ) => {
98+ beforeAll ( async ( ) => {
9999 for ( let n = 8080 ; n < 8090 ; n ++ ) {
100100 ports [ `${ n } ` ] = await getPort ( ) ;
101101 }
@@ -358,7 +358,7 @@ describe("#createProxyServer.web() using own http server", () => {
358358 expect ( Date . now ( ) - started ) . toBeGreaterThan ( 99 ) ;
359359 expect ( ( err as NodeJS . ErrnoException ) . code ) . toBeOneOf ( [
360360 "ECONNRESET" ,
361- "UND_ERR_HEADERS_TIMEOUT" ,
361+ 23 ,
362362 ] ) ;
363363 done ( ) ;
364364 } ) ;
@@ -435,7 +435,7 @@ describe("#createProxyServer.web() using own http server", () => {
435435 req . end ( ) ;
436436 } ) ) ;
437437
438- it . skipIf ( ( ) => process . env . FORCE_FETCH_PATH === "true" ) (
438+ it (
439439 "should proxy the request and provide a proxyRes event with the request and response parameters" ,
440440 ( ) =>
441441 new Promise < void > ( ( done ) => {
0 commit comments