Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

test(contact): await the addressbook accept-path calls

Yudhi Armyndharis62f2668f9d45
diff --git a/src/modules/contact/contact.service.spec.ts b/src/modules/contact/contact.service.spec.ts
index 29ea8bf17..066501295 100644
--- a/src/modules/contact/contact.service.spec.ts
+++ b/src/modules/contact/contact.service.spec.ts
@@ -170,9 +170,9 @@ describe('ContactService', () => {
['a phone jid', '[email protected]'],
['the engine dialect', '[email protected]'],
['a bare number', '628123456789'],
- ])('still accepts %s', (_label, id) => {
+ ])('still accepts %s', async (_label, id) => {
const upsertContact = jest.fn();
- makeService({ upsertContact }).upsertContact('s1', id, 'Ada');
+ await makeService({ upsertContact }).upsertContact('s1', id, 'Ada');
expect(upsertContact).toHaveBeenCalled();
});
});