@@ -11,6 +11,7 @@ import { describe, it, beforeAll, afterAll } from 'vitest';
1111import { HttpClient , RawResponseWithMeta , getGlobalDispatcher } from '../src/index.js' ;
1212import { startServer } from './fixtures/server.js' ;
1313import { nodeMajorVersion } from './utils.js' ;
14+ import { AddressInfo } from 'node:net' ;
1415
1516const pems = selfsigned . generate ( [ ] , {
1617 keySize : nodeMajorVersion ( ) >= 22 ? 2048 : 1024 ,
@@ -157,7 +158,7 @@ describe('HttpClient.test.ts', () => {
157158 } ,
158159 } ) ;
159160
160- const url = `https://localhost:${ server . address ( ) ! . port } ` ;
161+ const url = `https://localhost:${ ( server . address ( ) as AddressInfo ) . port } ` ;
161162 let response = await httpClient . request < string > ( url , {
162163 dataType : 'text' ,
163164 headers : {
@@ -220,7 +221,7 @@ describe('HttpClient.test.ts', () => {
220221 } ,
221222 } ) ;
222223
223- const url = `https://localhost:${ server . address ( ) ! . port } ` ;
224+ const url = `https://localhost:${ ( server . address ( ) as AddressInfo ) . port } ` ;
224225 let response = await httpClient . request < string > ( url , {
225226 dataType : 'text' ,
226227 headers : {
@@ -254,7 +255,7 @@ describe('HttpClient.test.ts', () => {
254255 } ) ;
255256
256257 describe ( 'clientOptions.lookup' , ( ) => {
257- it ( 'should work with custom lookup on HTTP protol ' , async ( ) => {
258+ it ( 'should work with custom lookup on HTTP protocol ' , async ( ) => {
258259 let lookupCallCounter = 0 ;
259260 const httpclient = new HttpClient ( {
260261 // mock lookup delay
@@ -411,7 +412,7 @@ describe('HttpClient.test.ts', () => {
411412
412413 it ( 'should throw error when request address is ip v6' , async ( ) => {
413414 const httpclient = new HttpClient ( {
414- checkAddress ( address , family ) {
415+ checkAddress ( _address , family ) {
415416 return family !== 6 ;
416417 } ,
417418 } ) ;
0 commit comments