Fix types on tests
This commit is contained in:
parent
c6c1450d06
commit
ff7120cf7a
|
@ -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 () => {
|
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(() => {
|
createChatCompletion: jest.fn(() => {
|
||||||
throw new Error("An error occurred while calling createChatCompletion")
|
throw new Error("An error occurred while calling createChatCompletion")
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -17,7 +17,7 @@ tk.freeze(timestamp)
|
||||||
const clearMigrations = async () => {
|
const clearMigrations = async () => {
|
||||||
const dbs = [context.getDevAppDB(), context.getProdAppDB()]
|
const dbs = [context.getDevAppDB(), context.getProdAppDB()]
|
||||||
for (const db of dbs) {
|
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 }
|
const newDoc = { _id: doc._id, _rev: doc._rev }
|
||||||
await db.put(newDoc)
|
await db.put(newDoc)
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ describe("migrations", () => {
|
||||||
await config.createTable()
|
await config.createTable()
|
||||||
await config.createView()
|
await config.createView()
|
||||||
await config.createTable()
|
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()
|
||||||
await config.createScreen()
|
await config.createScreen()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue