|
1 | 1 | import { WeaviateClient } from "weaviate-client"; |
2 | 2 | import { QueryAgent } from "./agent.js"; |
3 | 3 | import { ApiQueryAgentResponse } from "./response/api-response.js"; |
4 | | -import { |
5 | | - QueryAgentResponse, |
6 | | - ComparisonOperator, |
7 | | -} from "./response/response.js"; |
| 4 | +import { QueryAgentResponse, ComparisonOperator } from "./response/response.js"; |
8 | 5 | import { ApiSearchModeResponse } from "./response/api-response.js"; |
9 | 6 | import { QueryAgentError } from "./response/error.js"; |
10 | 7 |
|
@@ -176,9 +173,12 @@ it("search-only mode success: caches searches and sends on subsequent request", |
176 | 173 | } as Response); |
177 | 174 | }) as jest.Mock; |
178 | 175 |
|
179 | | - const agent = new QueryAgent(mockClient) |
| 176 | + const agent = new QueryAgent(mockClient); |
180 | 177 |
|
181 | | - const first = await agent.search("test query", { limit: 2, collections: ["test_collection"] }); |
| 178 | + const first = await agent.search("test query", { |
| 179 | + limit: 2, |
| 180 | + collections: ["test_collection"], |
| 181 | + }); |
182 | 182 | expect(first).toMatchObject({ |
183 | 183 | originalQuery: apiSuccess.original_query, |
184 | 184 | searches: [ |
@@ -254,7 +254,10 @@ it("search-only mode failure propagates QueryAgentError", async () => { |
254 | 254 |
|
255 | 255 | const agent = new QueryAgent(mockClient); |
256 | 256 | try { |
257 | | - await agent.search("test query", { limit: 2, collections: ["test_collection"] }); |
| 257 | + await agent.search("test query", { |
| 258 | + limit: 2, |
| 259 | + collections: ["test_collection"], |
| 260 | + }); |
258 | 261 | } catch (err) { |
259 | 262 | expect(err).toBeInstanceOf(QueryAgentError); |
260 | 263 | expect(err).toMatchObject({ |
|
0 commit comments