Skip to content

Commit

Permalink
fix(edges): resolve unit test error
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtabBukhari committed Nov 13, 2024
1 parent 4f89c94 commit c3f363a
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/components/App/SideBar/FilterSearch/__tests__/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,25 @@ describe('FilterSearch Component', () => {
const mockSetSchemas = jest.fn()
const mockSchemaAll = [{ type: 'Type1' }, { type: 'Type2' }, { type: 'Type3' }]

const mockEdges = [{ edge_type: 'Edge1' }, { edge_type: 'Edge2' }, { edge_type: 'Edge3' }]

beforeEach(() => {
jest.clearAllMocks()

//
;(useDataStore as jest.Mock).mockReturnValue({

Check failure on line 48 in src/components/App/SideBar/FilterSearch/__tests__/index.tsx

View workflow job for this annotation

GitHub Actions / eslint-run

Expected blank line before this statement
setFilters: mockSetFilters,
fetchData: mockFetchData,
setAbortRequests: mockSetAbortRequests,
})

//
;(useSchemaStore as jest.Mock).mockReturnValue([mockSchemaAll, mockSetSchemas]) // Return an array

//
;(useSchemaStore as jest.Mock).mockReturnValue({

Check failure on line 53 in src/components/App/SideBar/FilterSearch/__tests__/index.tsx

View workflow job for this annotation

GitHub Actions / eslint-run

Expected blank line before this statement
schemaAll: mockSchemaAll,
schemaLinks: mockEdges,
setSchemas: mockSetSchemas,
})
;(useFeatureFlagStore as jest.Mock).mockReturnValue({ fastFiltersFeatureFlag: true })

Check failure on line 58 in src/components/App/SideBar/FilterSearch/__tests__/index.tsx

View workflow job for this annotation

GitHub Actions / eslint-run

Expected blank line before this statement

//
;(getSchemaAll as jest.Mock).mockResolvedValue({ schemas: mockSchemaAll })
;(getSchemaAll as jest.Mock).mockResolvedValue({

Check failure on line 59 in src/components/App/SideBar/FilterSearch/__tests__/index.tsx

View workflow job for this annotation

GitHub Actions / eslint-run

Expected blank line before this statement
schemas: mockSchemaAll,
edges: mockEdges,
})
})

const renderComponent = () =>
Expand Down

0 comments on commit c3f363a

Please sign in to comment.