/* eslint-disable @typescript-eslint/no-unused-vars */ import VonageSMSSenderClient from './vonageSmsSender.client'; jest.mock('@vonage/server-sdk', () => { class Vonage { sms = { send: ({ from, to, body, }: { from: string; to: string; body: string; }): Promise => Promise.resolve({}), }; } return { Vonage, }; }); jest.mock('@vonage/auth', () => ({ Auth: class Auth {}, })); jest.mock('../../utils/constants', () => ({ FROM: '+123456789', USERNAME: 'qrvey', PASSWORD: '123456', })); describe('AwsSMSSender tests.', () => { beforeEach(() => { jest.clearAllMocks(); jest.resetAllMocks(); }); test('Should call send method.', async () => { const smsSender = new VonageSMSSenderClient(); const result = await smsSender.send( ['+1234567890', '+9876543210'], 'Hello world', ); expect(result).toMatchObject({ sent: [{ phone: '+1234567890' }, { phone: '+9876543210' }], }); }); });