The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/tests/mocks/client/FakeChatProvider.tsx

28 lines
608 B

import type { ReactElement, ReactNode } from 'react';
import React from 'react';
import { ChatContext } from '../../../client/views/room/contexts/ChatContext';
import { createFakeSubscription } from '../data';
type FakeChatProviderProps = {
children?: ReactNode;
};
const FakeChatProvider = ({ children }: FakeChatProviderProps): ReactElement => {
return (
<ChatContext.Provider
children={children}
value={
{
data: {
getSubscriptionFromMessage: async () => {
return createFakeSubscription();
},
},
} as any
}
/>
);
};
export default FakeChatProvider;