@@ -11,7 +11,7 @@ import { Readable } from "node:stream";
1111import { H3 , HTTPError , readBody , serve } from "h3" ;
1212import { Headers , FormData , Blob } from "node-fetch-native" ;
1313import { nodeMajorVersion } from "std-env" ;
14- import { $fetch } from "../src/node" ;
14+ import { $fetch } from "../src/node.ts " ;
1515
1616describe ( "ofetch" , ( ) => {
1717 let listener : ReturnType < typeof serve > ;
@@ -237,7 +237,7 @@ describe("ofetch", () => {
237237 } ) ;
238238
239239 it ( "404" , async ( ) => {
240- const error = await $fetch ( getURL ( "404" ) ) . catch ( ( error_ ) => error_ ) ;
240+ const error = await $fetch ( getURL ( "404" ) ) . catch ( ( error_ : any ) => error_ ) ;
241241 expect ( error . toString ( ) ) . toBe (
242242 `FetchError: [GET] "${ getURL ( "404" ) } ": 404 Not Found`
243243 ) ;
@@ -267,7 +267,7 @@ describe("ofetch", () => {
267267
268268 it ( "baseURL with retry" , async ( ) => {
269269 const error = await $fetch ( "" , { baseURL : getURL ( "404" ) , retry : 3 } ) . catch (
270- ( error_ ) => error_
270+ ( error_ : any ) => error_
271271 ) ;
272272 expect ( error . request ) . to . equal ( getURL ( "404" ) ) ;
273273 } ) ;
@@ -316,7 +316,7 @@ describe("ofetch", () => {
316316
317317 it ( "passing request obj should return request obj in error" , async ( ) => {
318318 const error = await $fetch ( getURL ( "/403" ) , { method : "post" } ) . catch (
319- ( error ) => error
319+ ( error : any ) => error
320320 ) ;
321321 expect ( error . toString ( ) ) . toBe (
322322 `FetchError: [POST] "${ getURL ( "403" ) } ": 403 Forbidden`
@@ -340,7 +340,7 @@ describe("ofetch", () => {
340340 await $fetch ( getURL ( "timeout" ) , {
341341 timeout : 100 ,
342342 retry : 0 ,
343- } ) . catch ( ( error ) => {
343+ } ) . catch ( ( error : any ) => {
344344 expect ( error . cause . message ) . to . include (
345345 "The operation was aborted due to timeout"
346346 ) ;
@@ -468,7 +468,7 @@ describe("ofetch", () => {
468468 onRequestError,
469469 onResponse,
470470 onResponseError,
471- } ) . catch ( ( error ) => error ) ;
471+ } ) . catch ( ( error : any ) => error ) ;
472472
473473 expect ( onRequest ) . toHaveBeenCalledOnce ( ) ;
474474 expect ( onRequestError ) . not . toHaveBeenCalled ( ) ;
0 commit comments