diff --git a/src/components/Message/Message.test.tsx b/src/components/Message/Message.test.tsx index bf5b50a..f5b6518 100644 --- a/src/components/Message/Message.test.tsx +++ b/src/components/Message/Message.test.tsx @@ -33,4 +33,10 @@ describe('Message', () => { screen.getByText(mockReceivedMessage.text) }) + + test('renders message author', () => { + render() + + screen.getByText(mockUserId) + }) }) diff --git a/src/components/Message/Message.tsx b/src/components/Message/Message.tsx index ec71486..cdf9845 100644 --- a/src/components/Message/Message.tsx +++ b/src/components/Message/Message.tsx @@ -48,7 +48,16 @@ export const Message = ({ message, userId }: MessageProps) => { } return ( -
+ + + {userId} + { {message.text} -
+ ) }