From 6eb61746411f0ece2b700a280708cd170213d3ba Mon Sep 17 00:00:00 2001 From: ogzhanolguncu Date: Wed, 17 Jan 2024 16:35:20 +0300 Subject: [PATCH] Fix format issues --- src/commands/client/stats/index.test.ts | 11 ++--------- src/vector.ts | 15 +++++---------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/commands/client/stats/index.test.ts b/src/commands/client/stats/index.test.ts index da25f0c..a25d499 100644 --- a/src/commands/client/stats/index.test.ts +++ b/src/commands/client/stats/index.test.ts @@ -1,11 +1,6 @@ import { afterAll, describe, expect, test } from "bun:test"; import { UpsertCommand } from "@commands/index"; -import { - newHttpClient, - randomFloat, - randomID, - resetIndexes, -} from "@utils/test-utils"; +import { newHttpClient, randomFloat, randomID, resetIndexes } from "@utils/test-utils"; import { sleep } from "bun"; import { StatsCommand } from "."; @@ -21,9 +16,7 @@ describe("STATS", () => { vector: [randomFloat(), randomFloat()], })); - const payloads = randomizedData.map((data) => - new UpsertCommand(data).exec(client) - ); + const payloads = randomizedData.map((data) => new UpsertCommand(data).exec(client)); await Promise.all(payloads); await sleep(2000); const res = await new StatsCommand().exec(client); diff --git a/src/vector.ts b/src/vector.ts index 4cf4f56..e260d55 100644 --- a/src/vector.ts +++ b/src/vector.ts @@ -44,8 +44,7 @@ export class Index { * @param id - List of ids or single id * @returns A promise that resolves when the request to delete the index is completed. */ - delete = (args: CommandArgs) => - new DeleteCommand(args).exec(this.client); + delete = (args: CommandArgs) => new DeleteCommand(args).exec(this.client); /** * Queries an index with specified parameters. @@ -65,8 +64,7 @@ export class Index { * * @returns A promise that resolves with an array of query result objects when the request to query the index is completed. */ - query = (args: CommandArgs) => - new QueryCommand(args).exec(this.client); + query = (args: CommandArgs) => new QueryCommand(args).exec(this.client); /** * Upserts (Updates and Inserts) specific items into the index. @@ -90,8 +88,7 @@ export class Index { * * @returns {string} A promise that resolves with the result of the upsert operation after the command is executed. */ - upsert = (args: CommandArgs) => - new UpsertCommand(args).exec(this.client); + upsert = (args: CommandArgs) => new UpsertCommand(args).exec(this.client); /** * It's used for retrieving specific items from the index, optionally including @@ -113,8 +110,7 @@ export class Index { * * @returns {Promise[]>} A promise that resolves with an array of fetched items or null if not found, after the command is executed. */ - fetch = (...args: CommandArgs) => - new FetchCommand(args).exec(this.client); + fetch = (...args: CommandArgs) => new FetchCommand(args).exec(this.client); /** * It's used for wiping an entire index. @@ -152,8 +148,7 @@ export class Index { * * @returns {Promise>} A promise that resolves with the response containing the next cursor and an array of vectors, after the command is executed. */ - range = (args: CommandArgs) => - new RangeCommand(args).exec(this.client); + range = (args: CommandArgs) => new RangeCommand(args).exec(this.client); /** * Retrieves stats from the index.