Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
test(contact): keep the new response DTO off an uncoverable branch
Yudhi Armyndharisa6cc6992a791
diff --git a/src/modules/contact/dto/contact-response.dto.ts b/src/modules/contact/dto/contact-response.dto.tsindex 1240c2409..e6aab4eab 100644--- a/src/modules/contact/dto/contact-response.dto.ts+++ b/src/modules/contact/dto/contact-response.dto.ts@@ -61,7 +61,10 @@ export class ProfilePicturesResponseDto {example: { '[email protected]': 'https://pps.whatsapp.net/v/t61.24694-24/12345_678_910_n.jpg' },additionalProperties: { type: 'string', nullable: true },})- pictures!: Record<string, string | null>;+ // An inline index signature, not Record<>: emitDecoratorMetadata wraps a NAMED type in a+ // `typeof X !== "undefined" && X ? … : Object` runtime guard, and since a type-only name is never+ // a value one arm of that guard can never execute — an uncoverable branch in every DTO that uses one.+ pictures!: { [contactId: string]: string | null };}export class NumberCheckResponseDto {