Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
test(infra): keep the queue status spec off the network
Yudhi Armyndharis1bc67c9deb73
diff --git a/src/modules/infra/infra-status.controller.spec.ts b/src/modules/infra/infra-status.controller.spec.tsindex 866e90e95..de859efe4 100644--- a/src/modules/infra/infra-status.controller.spec.ts+++ b/src/modules/infra/infra-status.controller.spec.ts@@ -55,7 +55,9 @@ describe('InfraStatusController.getStatus DB health (active SELECT 1 probe, notdescribe('InfraStatusController.getStatus queue job counts', () => {function buildStatusController(opts: { queueEnabled: boolean; queue?: { getJobCounts: jest.Mock } }) {const configService = {- get: (key: string, def?: unknown) => (key === 'queue.enabled' ? opts.queueEnabled : def),+ // engine.type=baileys skips the wa-web-version registry fetch (no network in unit tests).+ get: (key: string, def?: unknown) =>+ key === 'queue.enabled' ? opts.queueEnabled : key === 'engine.type' ? 'baileys' : def,};const dataSource = { isInitialized: true, query: jest.fn().mockResolvedValue([{ '1': 1 }]) } as unknown;const engineFactory = { create: jest.fn() };