diff --git a/test/manage_rest.test.ts b/test/manage_rest.test.ts index 6268e15..a5937b7 100644 --- a/test/manage_rest.test.ts +++ b/test/manage_rest.test.ts @@ -237,7 +237,7 @@ describe("making manage REST requests", () => { // Add your assertions for the response data here }); - it("should retrieve a models", async () => { + it("should retrieve a model", async () => { const { result, error } = await deepgram.manage.getModel( faker.string.uuid(), faker.string.uuid() diff --git a/test/models_rest.test.ts b/test/models_rest.test.ts index e84e966..18012c9 100644 --- a/test/models_rest.test.ts +++ b/test/models_rest.test.ts @@ -1,24 +1,26 @@ import { assert } from "chai"; import { createClient } from "../src"; import { faker } from "@faker-js/faker"; -import { ModelsRestClient } from "../src/packages"; +import DeepgramClient from "../src/DeepgramClient"; -describe("ModelsRestClient", () => { - let modelsRestClient: ModelsRestClient; +describe("making models REST requests", () => { + let deepgram: DeepgramClient; beforeEach(() => { - modelsRestClient = createClient(faker.string.alphanumeric(40)).models; + deepgram = createClient(faker.string.alphanumeric(40), { + global: { url: "https://api.mock.deepgram.com" }, + }); }); it("should retrieve a list of models", async () => { - const { result, error } = await modelsRestClient.getAll(); + const { result, error } = await deepgram.models.getAll(); assert.isNull(error); assert.isNotNull(result); }); - it("should retrieve a models", async () => { - const { result, error } = await modelsRestClient.getModel(faker.string.uuid()); + it("should retrieve a model", async () => { + const { result, error } = await deepgram.models.getModel(faker.string.uuid()); assert.isNull(error); assert.isNotNull(result);