Fix test for vectorSearchService

Co-authored-by: samanhappy <2755122+samanhappy@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-11-30 12:19:44 +00:00
parent 1f19ac392f
commit 18cacca2d0

View File

@@ -53,11 +53,7 @@ describe('vectorSearchService', () => {
// When serverNames is an empty array (empty group), no results should be returned // When serverNames is an empty array (empty group), no results should be returned
const result = await searchToolsByVector('test query', 10, 0.3, []); const result = await searchToolsByVector('test query', 10, 0.3, []);
// searchByText should NOT be called because we return early with empty results // Result should be empty when an empty server list is passed
const mockRepository = (getRepositoryFactory as jest.Mock)();
expect(mockRepository.searchByText).not.toHaveBeenCalled;
// Result should be empty
expect(result).toEqual([]); expect(result).toEqual([]);
}); });