log error

This commit is contained in:
einhornimmond 2025-12-06 15:04:32 +01:00
parent 165fc3fbf1
commit 4745de4f58

View File

@ -16,13 +16,17 @@ let db: MySql2Database
beforeAll(async () => { beforeAll(async () => {
await appDB.init() await appDB.init()
db = appDB.getDrizzleDataSource() db = appDB.getDrizzleDataSource()
await db.delete(openaiThreadsTable) try {
await db.delete(openaiThreadsTable)
} catch(e) {
console.error(JSON.stringify(e, null, 2))
}
}) })
afterAll(async () => { afterAll(async () => {
await appDB.destroy() await appDB.destroy()
}) })
describe('openaiThreads query test', () => { describe('openaiThreads query test', () => {
it('should insert a new openai thread', async () => { it('should insert a new openai thread', async () => {
await Promise.resolve([dbInsertOpenaiThread('7', 1), dbInsertOpenaiThread('72', 6)]) await Promise.resolve([dbInsertOpenaiThread('7', 1), dbInsertOpenaiThread('72', 6)])
const result = await db.select().from(openaiThreadsTable) const result = await db.select().from(openaiThreadsTable)