Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
test(label): reach the session check in the upsert not-started case
Yudhi Armyndharis6a0bd306e0be
diff --git a/src/modules/label/label.service.spec.ts b/src/modules/label/label.service.spec.tsindex b75cbdc9b..499acfb25 100644--- a/src/modules/label/label.service.spec.ts+++ b/src/modules/label/label.service.spec.ts@@ -129,11 +129,12 @@ describe('LabelService label editing', () => {});it.each([- ['upsertLabel', (svc: LabelService) => svc.upsertLabel('s1', 'l1', {})],+ ['upsertLabel', (svc: LabelService) => svc.upsertLabel('s1', 'l1', { name: 'VIP' })],['deleteLabel', (svc: LabelService) => svc.deleteLabel('s1', 'l1')],['getChatsByLabel', (svc: LabelService) => svc.getChatsByLabel('s1', 'l1')],])('throws 400 for %s when the session is not started', (_name, call) => {const engines = new EngineRegistry();expect(() => call(new LabelService(engines))).toThrow(BadRequestException);+ expect(() => call(new LabelService(engines))).toThrow('Session is not started');});});