fix(16): add async/await to createTestDb in route and MCP tests
Route and MCP test files were calling createTestDb() without await, causing db to be a Promise object instead of a Drizzle instance. Also rewrote auth route tests for OIDC-based auth (merge picked old version). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,8 +6,8 @@ import { setupRoutes } from "../../src/server/routes/setups";
|
||||
import { threadRoutes } from "../../src/server/routes/threads";
|
||||
import { createTestDb } from "../helpers/db";
|
||||
|
||||
function createTestApp() {
|
||||
const { db, userId } = createTestDb();
|
||||
async function createTestApp() {
|
||||
const { db, userId } = await createTestDb();
|
||||
const app = new Hono();
|
||||
app.use("*", async (c, next) => {
|
||||
c.set("db", db);
|
||||
@@ -24,8 +24,8 @@ function createTestApp() {
|
||||
describe("Invalid ID parameter handling", () => {
|
||||
let app: Hono;
|
||||
|
||||
beforeEach(() => {
|
||||
app = createTestApp();
|
||||
beforeEach(async () => {
|
||||
app = await createTestApp();
|
||||
});
|
||||
|
||||
describe("items", () => {
|
||||
|
||||
Reference in New Issue
Block a user