From 69723305eb5998cae6376b76c9a59f52df3e17e4 Mon Sep 17 00:00:00 2001 From: Chewbacca Date: Thu, 3 Nov 2022 13:22:06 -0400 Subject: [PATCH] Fix tests --- .../__tests__/chat-message-list.test.tsx | 29 ++++++++++++------- app/soapbox/jest/test-helpers.tsx | 8 ++--- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/app/soapbox/features/chats/components/__tests__/chat-message-list.test.tsx b/app/soapbox/features/chats/components/__tests__/chat-message-list.test.tsx index 0ab2c5f7ca..d28f68cd40 100644 --- a/app/soapbox/features/chats/components/__tests__/chat-message-list.test.tsx +++ b/app/soapbox/features/chats/components/__tests__/chat-message-list.test.tsx @@ -12,17 +12,26 @@ import { IChat, IChatMessage } from '../../../../queries/chats'; import ChatMessageList from '../chat-message-list'; const chat: IChat = { - id: '14', - unread: 5, - created_by_account: '2', - account: { - id: '1', - avatar: 'url', - acct: 'username', - } as IAccount, - last_message: null, accepted: true, -} as IChat; + account: { + username: 'username', + verified: true, + id: '1', + acct: 'acct', + avatar: 'avatar', + avatar_static: 'avatar', + display_name: 'my name', + } as IAccount, + created_at: '2020-06-10T02:05:06.000Z', + created_by_account: '2', + discarded_at: null, + id: '14', + last_message: null, + latest_read_message_by_account: [], + latest_read_message_created_at: null, + message_expiration: 1209600, + unread: 5, +}; const chatMessages: IChatMessage[] = [ { diff --git a/app/soapbox/jest/test-helpers.tsx b/app/soapbox/jest/test-helpers.tsx index 6bc3111374..8b0b62f328 100644 --- a/app/soapbox/jest/test-helpers.tsx +++ b/app/soapbox/jest/test-helpers.tsx @@ -51,8 +51,8 @@ const TestApp: FC = ({ children, storeProps, routerProps = {} }) => { return ( - - + + {children} @@ -60,8 +60,8 @@ const TestApp: FC = ({ children, storeProps, routerProps = {} }) => { - - + + );