chat-service.mock.ts 573 B

123456789101112131415161718
  1. import { ChatMessage } from '../interfaces/chat-message.model';
  2. import { ChatStaticService, UserRegistrationResponse } from './chat-service';
  3. export const chatServiceMockOf = (
  4. chatHistory: ChatMessage[],
  5. userRegistrationResponse: UserRegistrationResponse,
  6. ): ChatStaticService =>
  7. class ChatServiceMock {
  8. public static async getChatHistory(): Promise<ChatMessage[]> {
  9. return chatHistory;
  10. }
  11. public static async registerUser(): Promise<UserRegistrationResponse> {
  12. return userRegistrationResponse;
  13. }
  14. };
  15. export default chatServiceMockOf;