mirror of
https://github.com/cheveguerra/api-whatsapp-ts.git
synced 2026-04-20 04:39:16 +00:00
continue
This commit is contained in:
13
__test__/bot/__mocks__/whatsapp.repositoryMock.ts
Normal file
13
__test__/bot/__mocks__/whatsapp.repositoryMock.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Message } from "../../../src/bot/domain/message";
|
||||
import WhatsappRepository from "../../../src/bot/domain/repositories/whatsapp.repository";
|
||||
|
||||
const MESSAGE_MOCK = new Message({ msg: "Hola msg!", phone: "777777777" });
|
||||
|
||||
export default class WhatsappRepositoryMock implements WhatsappRepository {
|
||||
sendMsg({ msg, phone, contextId }: any): Promise<Message | null | undefined> {
|
||||
return Promise.resolve(MESSAGE_MOCK);
|
||||
}
|
||||
onMsg({ msg, phone }: any): Promise<string | null | undefined> {
|
||||
return Promise.resolve('MESSAGE_MOCK');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user