Fix types on tests

This commit is contained in:
Adria Navarro 2023-08-01 12:57:44 +02:00
parent c6c1450d06
commit ff7120cf7a
2 changed files with 3 additions and 3 deletions

View File

@ -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")
}),

View File

@ -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<any>(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()