|
1 |
| -import { describe, it, expect, vi, beforeEach, afterEach, beforeAll, type Mock, type MockedFunction, afterAll } from 'vitest'; |
| 1 | +import { describe, it, expect, vi, beforeEach, afterEach, beforeAll, type Mock, type MockedFunction } from 'vitest'; |
2 | 2 | import { QdrantClient } from '@qdrant/js-client-rest';
|
3 | 3 |
|
4 | 4 | // 2. Mock external dependencies FIRST
|
@@ -63,7 +63,7 @@ describe('Query Refinement Tests', () => {
|
63 | 63 |
|
64 | 64 | describe('searchWithRefinement', () => {
|
65 | 65 | let searchWithRefinementSUT_local: (typeof import('../query-refinement.js'))['searchWithRefinement'];
|
66 |
| - let mockRefineQuery_for_searchTest: Mock<[string, DetailedQdrantSearchResult[], number], string>; |
| 66 | + let mockRefineQuery_for_searchTest: MockedFunction<(query: string, results: DetailedQdrantSearchResult[], currentRelevance: number) => string>; |
67 | 67 |
|
68 | 68 | beforeEach(async () => {
|
69 | 69 | vi.resetModules(); // Ensure clean state for vi.doMock
|
@@ -181,9 +181,9 @@ describe('Query Refinement Tests', () => {
|
181 | 181 |
|
182 | 182 | describe('refineQuery (main dispatcher - testing original logic)', () => {
|
183 | 183 | let refineQuerySUT_local: (typeof import('../query-refinement.js'))['refineQuery'];
|
184 |
| - let mockBroadenQuery_local: Mock<[string], string>; |
185 |
| - let mockFocusQuery_local: Mock<[string, DetailedQdrantSearchResult[]], string>; |
186 |
| - let mockTweakQuery_local: Mock<[string, DetailedQdrantSearchResult[]], string>; |
| 184 | + let mockBroadenQuery_local: MockedFunction<(query: string) => string>; |
| 185 | + let mockFocusQuery_local: MockedFunction<(query: string, results: DetailedQdrantSearchResult[]) => string>; |
| 186 | + let mockTweakQuery_local: MockedFunction<(query: string, results: DetailedQdrantSearchResult[]) => string>; |
187 | 187 |
|
188 | 188 | beforeEach(async () => {
|
189 | 189 | vi.resetModules(); // Ensure clean state for vi.doMock
|
|
0 commit comments