Skip to content

Commit

Permalink
fixed some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturBekhDEV committed Sep 7, 2023
1 parent 572b773 commit 14fd9ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/message/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const Message: FC<MessageProps> = ({
message,
prevMessage,
sx = {},
filteredMessages,
filteredMessages = [],
filteredIndex
}) => {
const { userId: myId } = useAppSelector((state) => state.appMain)
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/components/message/Message.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import { getFormattedDate } from '~/utils/helper-functions'
import { messagesMock } from '~tests/unit/containers/chat/list-of-users-with-search/MockChat.spec.constants'

const messageMock = messagesMock[0]

const filteredMessageMock = ['Some text']
describe('Message component', () => {
beforeEach(() => {
renderWithProviders(
<Message
filteredIndex={1}
filteredMessages={['Some text']}
filteredMessages={filteredMessageMock}
message={messageMock}
/>
)
Expand Down

0 comments on commit 14fd9ce

Please sign in to comment.