- Add `app` export and wrap startup logic behind `if (import.meta.main)` - Extract `hono` middleware into `sdk/hono.ts` for clean separation - Refactor module imports slightly to support in-memory native mocking (`db`, `valkey`, `spire_ffi`, `ratelimit`, `audit`) - Implement comprehensive native Deno mock tests in `server/main.test.ts` - Fix type checking across project files Co-authored-by: mrteye <1945243+mrteye@users.noreply.github.com>
13 lines
386 B
TypeScript
13 lines
386 B
TypeScript
import { assert } from "jsr:@std/assert";
|
|
|
|
Deno.test("DB Test - Structure check", async () => {
|
|
Deno.env.set("POSTGRES_HOST", "localhost");
|
|
Deno.env.set("POSTGRES_USER", "postgres");
|
|
Deno.env.set("POSTGRES_PASSWORD", "postgres");
|
|
Deno.env.set("POSTGRES_DB", "auth_yes");
|
|
|
|
const dbModule = await import("./db.ts");
|
|
assert(dbModule.sqlWrapper);
|
|
assert(dbModule.initDb);
|
|
});
|