Fix TypeScript implicit type errors in SearchableDropdown tests (#2355)

* Initial plan

* Fix TypeScript compilation errors in SearchableDropdown.test.tsx

Co-authored-by: nishthaAhujaa <45535788+nishthaAhujaa@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nishthaAhujaa <45535788+nishthaAhujaa@users.noreply.github.com>
This commit is contained in:
Copilot
2026-01-27 15:42:53 +05:30
committed by GitHub
parent f7d3dc198e
commit 6d0d9ba68b

View File

@@ -18,7 +18,7 @@ describe("SearchableDropdown", () => {
const defaultProps = {
label: "Test Label",
items: mockItems,
selectedItem: null,
selectedItem: null as TestItem | null,
onSelect: jest.fn(),
getKey: (item: TestItem) => item.id,
getDisplayText: (item: TestItem) => item.name,
@@ -49,7 +49,7 @@ describe("SearchableDropdown", () => {
it("should show 'No items found' when items array is empty", () => {
const propsWithEmptyItems = {
...defaultProps,
items: [],
items: [] as TestItem[],
};
render(<SearchableDropdown {...propsWithEmptyItems} />);
expect(screen.getByText("No Test Labels Found")).toBeInTheDocument();