mirror of
https://github.com/owncast/owncast.git
synced 2024-12-18 07:12:33 +03:00
19 lines
573 B
TypeScript
19 lines
573 B
TypeScript
|
import { ChatMessage } from '../interfaces/chat-message.model';
|
||
|
import { ChatStaticService, UserRegistrationResponse } from './chat-service';
|
||
|
|
||
|
export const chatServiceMockOf = (
|
||
|
chatHistory: ChatMessage[],
|
||
|
userRegistrationResponse: UserRegistrationResponse,
|
||
|
): ChatStaticService =>
|
||
|
class ChatServiceMock {
|
||
|
public static async getChatHistory(): Promise<ChatMessage[]> {
|
||
|
return chatHistory;
|
||
|
}
|
||
|
|
||
|
public static async registerUser(): Promise<UserRegistrationResponse> {
|
||
|
return userRegistrationResponse;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
export default chatServiceMockOf;
|