@@ -292,10 +292,7 @@ test("ApiError.toString() includes sanitized body and ApiError.toJSON() returns
292292 assert . equal ( json . statusText , "Not Found" ) ;
293293 assert . equal ( json . message , "Resource not found." ) ;
294294 assert . equal ( json . isTimeout , false ) ;
295- assert . equal (
296- ( json . body as Record < string , unknown > ) . token ,
297- "[REDACTED]"
298- ) ;
295+ assert . equal ( ( json . body as Record < string , unknown > ) . token , "[REDACTED]" ) ;
299296 assert . ok (
300297 typeof json . stack === "string" ,
301298 "toJSON should include stack trace"
@@ -545,7 +542,10 @@ test("ApiClient sanitizes request and response payloads in logs by default", asy
545542 info : ( ) => { } ,
546543 } ;
547544 const fetchImpl = async ( ) =>
548- jsonResponse ( { token : "response-secret" , profile : { password : "p4ss" } } ) ;
545+ jsonResponse ( {
546+ token : "response-secret" ,
547+ profile : { password : "p4ss" } ,
548+ } ) ;
549549 const client = new ApiClient ( {
550550 baseUrl : "https://api.example.com" ,
551551 fetchImpl,
@@ -561,7 +561,12 @@ test("ApiClient sanitizes request and response payloads in logs by default", asy
561561 const requestLog = logCalls . find ( ( entry ) => "body" in entry ) ! ;
562562 const responseLog = logCalls . find ( ( entry ) => "data" in entry ) ! ;
563563 assert . equal (
564- ( ( requestLog . body as Record < string , unknown > ) . nested as Record < string , unknown > ) . apiKey ,
564+ (
565+ ( requestLog . body as Record < string , unknown > ) . nested as Record <
566+ string ,
567+ unknown
568+ >
569+ ) . apiKey ,
565570 "[REDACTED]"
566571 ) ;
567572 assert . equal (
0 commit comments