auth-yes/server/db.test.ts
google-labs-jules[bot] 9988df3218 audit: verify 3-tier auth, rbac, and decouple server side effects
- 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>
2026-08-22 00:29:19 +00:00

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);
});