Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
spikechroma committed Sep 10, 2024
1 parent ceea284 commit 6a394a1
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions clients/js/test/add.collections.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,19 @@ describe("add collections", () => {
const ids = IDS.concat(["test1"]);
const embeddings = EMBEDDINGS.concat([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]);
const metadatas = METADATAS.concat([{ test: "test1", float_value: 0.1 }]);
try {
expect(async () => {
await collection.add({ ids, embeddings, metadatas });
} catch (e: any) {
expect(e.message).toMatch("duplicates");
}
}).rejects.toThrow("found duplicates");
});

test("should error on empty embedding", async () => {
const collection = await client.createCollection({ name: "test" });
const ids = ["id1"];
const embeddings = [[]];
const metadatas = [{ test: "test1", float_value: 0.1 }];
try {
expect(async () => {
await collection.add({ ids, embeddings, metadatas });
} catch (e: any) {
expect(e.message).toMatch("got empty embedding at pos");
}
}).rejects.toThrow("got empty embedding at pos");
});

if (!process.env.OLLAMA_SERVER_URL) {
Expand Down

0 comments on commit 6a394a1

Please sign in to comment.