chore(release): bump Python SDK to 2.2.1 and TypeScript SDK to 3.3.1 (#7456)
This commit is contained in:
@@ -2,24 +2,20 @@
|
||||
/**
|
||||
* Turbopuffer vector store — score conversion unit tests.
|
||||
*
|
||||
* Drives parseRows() through the public search() API with a virtually-mocked
|
||||
* Drives parseRows() through the public search() API with a mocked
|
||||
* @turbopuffer/turbopuffer peer, asserting the score returned per metric.
|
||||
*/
|
||||
|
||||
const mockQuery = jest.fn();
|
||||
|
||||
jest.mock(
|
||||
"@turbopuffer/turbopuffer",
|
||||
() => ({
|
||||
__esModule: true,
|
||||
default: class {
|
||||
namespace() {
|
||||
return { query: mockQuery };
|
||||
}
|
||||
},
|
||||
}),
|
||||
{ virtual: true },
|
||||
);
|
||||
jest.mock("@turbopuffer/turbopuffer", () => ({
|
||||
__esModule: true,
|
||||
default: class {
|
||||
namespace() {
|
||||
return { query: mockQuery };
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
||||
import { TurbopufferDB } from "../src/vector_stores/turbopuffer";
|
||||
|
||||
|
||||
@@ -3,27 +3,22 @@
|
||||
* Turbopuffer vector store — filter translation unit tests.
|
||||
*
|
||||
* Drives the private convertFilters() through the public search() API with a
|
||||
* virtually-mocked @turbopuffer/turbopuffer peer, and asserts the filter tuple
|
||||
* handed to ns.query().
|
||||
* mocked @turbopuffer/turbopuffer peer, and asserts the filter tuple handed to
|
||||
* ns.query().
|
||||
*/
|
||||
|
||||
const mockQuery = jest.fn().mockResolvedValue({ rows: [] });
|
||||
|
||||
// The peer is an optional dependency and may not be installed; mock it
|
||||
// virtually. createClient() does `new sdk.default({...})`, whose namespace()
|
||||
// returns the object search() calls query() on.
|
||||
jest.mock(
|
||||
"@turbopuffer/turbopuffer",
|
||||
() => ({
|
||||
__esModule: true,
|
||||
default: class {
|
||||
namespace() {
|
||||
return { query: mockQuery };
|
||||
}
|
||||
},
|
||||
}),
|
||||
{ virtual: true },
|
||||
);
|
||||
// createClient() does `new sdk.default({...})`, whose namespace() returns the
|
||||
// object search() calls query() on.
|
||||
jest.mock("@turbopuffer/turbopuffer", () => ({
|
||||
__esModule: true,
|
||||
default: class {
|
||||
namespace() {
|
||||
return { query: mockQuery };
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
||||
import { TurbopufferDB } from "../src/vector_stores/turbopuffer";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user