Reorganize repo structure and standards references

This commit is contained in:
david committed 2026-06-29 05:03:42 +02:00
1 parent 3cb93a81be
commit be2054274d
5885 files changed
+2588 -195

No files matched your search

@@ -0,0 +1,32 @@
import { describe, expect, it, vi } from "vitest";
vi.mock("~/utils/db.server", () => ({
db: {
appConfiguration: {
count: vi.fn(),
},
},
}));
describe("web healthz route", () => {
it("returns liveness without touching the database", async () => {
const { db } = await import("~/utils/db.server");
const { loader } = await import("./healthz");
const response = await loader();
const body = await response.json();
expect(response.status).toBe(200);
expect(body).toEqual({ status: "ok", service: "web", revision: "unknown" });
expect(db.appConfiguration.count).not.toHaveBeenCalled();
});
it("reports the injected app revision when present", async () => {
vi.stubEnv("APP_REVISION", "abc1234");
const { loader } = await import("./healthz");
const response = await loader();
await expect(response.json()).resolves.toMatchObject({ revision: "abc1234" });
});
});