Skip to content

Commit

Permalink
fix(unit-test): unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
saithsab877 committed Sep 16, 2024
1 parent c13d032 commit 6656981
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/App/SideBar/FilterSearch/__tests__/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const mockSetShowAllSchemas = jest.fn()
const mockSetAnchorEl = jest.fn()
const mockFetchData = jest.fn()
const mockSetAbortRequests = jest.fn()
const mockOnClose = jest.fn()

const mockSchemaAll = [{ type: 'Type1' }, { type: 'Type2' }, { type: 'Type3' }, { type: 'Type4' }, { type: 'Type5' }]

Expand All @@ -28,6 +29,7 @@ describe('FilterSearch Component', () => {
setFilters: mockSetFilters,
fetchData: mockFetchData,
setAbortRequests: mockSetAbortRequests,
onClose: mockOnClose,
})
})

Expand All @@ -37,6 +39,7 @@ describe('FilterSearch Component', () => {
<StyleThemeProvider theme={appTheme}>
<FilterSearch
anchorEl={document.createElement('div')}
onClose={mockOnClose}
schemaAll={mockSchemaAll}
setAnchorEl={mockSetAnchorEl}
setShowAllSchemas={mockSetShowAllSchemas}
Expand Down Expand Up @@ -174,6 +177,7 @@ describe('FilterSearch Component', () => {
<StyleThemeProvider theme={appTheme}>
<FilterSearch
anchorEl={null}
onClose={mockOnClose}
schemaAll={mockSchemaAll}
setAnchorEl={mockSetAnchorEl}
setShowAllSchemas={mockSetShowAllSchemas}
Expand Down

0 comments on commit 6656981

Please sign in to comment.