diff --git a/packages/server/src/automations/tests/openai.spec.ts b/packages/server/src/automations/tests/openai.spec.ts index 31f7e48305..07ac73a7c8 100644 --- a/packages/server/src/automations/tests/openai.spec.ts +++ b/packages/server/src/automations/tests/openai.spec.ts @@ -68,7 +68,7 @@ describe("test the openai action", () => { }) it("should present the correct error message when an error is thrown from the createChatCompletion call", async () => { - openai.OpenAIApi.mockImplementation(() => ({ + ;(openai.OpenAIApi as any).mockImplementation(() => ({ createChatCompletion: jest.fn(() => { throw new Error("An error occurred while calling createChatCompletion") }), diff --git a/packages/server/src/migrations/tests/index.spec.ts b/packages/server/src/migrations/tests/index.spec.ts index b0fd971f42..2465c930b4 100644 --- a/packages/server/src/migrations/tests/index.spec.ts +++ b/packages/server/src/migrations/tests/index.spec.ts @@ -17,7 +17,7 @@ tk.freeze(timestamp) const clearMigrations = async () => { const dbs = [context.getDevAppDB(), context.getProdAppDB()] for (const db of dbs) { - const doc = await db.get(DocumentType.MIGRATIONS) + const doc = await db.get(DocumentType.MIGRATIONS) const newDoc = { _id: doc._id, _rev: doc._rev } await db.put(newDoc) } @@ -52,7 +52,7 @@ describe("migrations", () => { await config.createTable() await config.createView() await config.createTable() - await config.createView(structures.view(config.table._id)) + await config.createView(structures.view(config.table!._id!)) await config.createScreen() await config.createScreen()