Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturBekhDEV committed Sep 19, 2023
1 parent 8e8cca1 commit aafc104
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/search-by-message/SearchByMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const SearchByMessage: FC<SearchByMessageProps> = ({
}, [search, messages])

const onClose = () => {
setSearch('')
isCloseSearch()
onFilteredMessagesChange([])
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import SearchByMessage from '~/components/search-by-message/SearchByMessage'
describe('SearchByMessage', () => {
const onFilteredMessagesChange = vi.fn()
const onFilteredIndexChange = vi.fn()
const isCloseSearch = vi.fn()
const mockMessage = [
{
_id: '64ee0a2f6ae3b95ececb05b5',
Expand Down Expand Up @@ -38,6 +39,7 @@ describe('SearchByMessage', () => {
beforeEach(() => {
render(
<SearchByMessage
isCloseSearch={isCloseSearch}
messages={mockMessage}
onFilteredIndexChange={onFilteredIndexChange}
onFilteredMessagesChange={onFilteredMessagesChange}
Expand Down

0 comments on commit aafc104

Please sign in to comment.