import { Sms77SmsProvider } from './sms77.provider' ; test ( 'should trigger sms77 correctly' , async ( ) => { const provider = new Sms77SmsProvider ( { apiKey : '<sms77-api-key>' , from : '+1145678' , } ) ; const spy = jest . spyOn ( provider . sms77Client , 'sms' ) . mockImplementation ( async ( ) => { return { messages : [ { id : null } ] , } as any ; } ) ; await provider . sendMessage ( { to : '+187654' , content : 'Test' , } ) ; expect ( spy ) . toHaveBeenCalled ( ) ; expect ( spy ) . toHaveBeenCalledWith ( { from : '+1145678' , json : true , text : 'Test' , to : '+187654' , } ) ; } ) ;