mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-18 16:12:11 +00:00
style: apply prettier across the tree
One-shot prettier pass so the new format:check gate starts from a clean baseline. Formatting only — no behaviour change. Generator-owned and vendored artifacts stay untouched via .prettierignore.
This commit is contained in:
1 parent
b3fea2ef59
commit
1f4ba5939d
1000 files changed
+12130
-8385
No files matched your search
@@ -52,10 +52,9 @@ vi.mock("@/lib/ai/consent-guard", () => ({
|
||||
}));
|
||||
|
||||
vi.mock("@/lib/ai/provider-runner", async () => {
|
||||
const actual =
|
||||
await vi.importActual<typeof import("@/lib/ai/provider-runner")>(
|
||||
"@/lib/ai/provider-runner",
|
||||
);
|
||||
const actual = await vi.importActual<
|
||||
typeof import("@/lib/ai/provider-runner")
|
||||
>("@/lib/ai/provider-runner");
|
||||
return {
|
||||
...actual,
|
||||
runRawCompletionWithFallback: vi.fn(),
|
||||
@@ -65,17 +64,17 @@ vi.mock("@/lib/ai/provider-runner", async () => {
|
||||
vi.mock("@/lib/logging/context", () => ({
|
||||
annotate: vi.fn(),
|
||||
getEvent: vi.fn(() => null),
|
||||
eventStorage: { getStore: () => undefined, run: (_s: unknown, f: () => unknown) => f() },
|
||||
eventStorage: {
|
||||
getStore: () => undefined,
|
||||
run: (_s: unknown, f: () => unknown) => f(),
|
||||
},
|
||||
}));
|
||||
|
||||
import { POST } from "../route";
|
||||
import { requireAuth, HttpError } from "@/lib/api-handler";
|
||||
import { checkRateLimit } from "@/lib/rate-limit";
|
||||
import { enforceBudget } from "@/lib/ai/coach/budget";
|
||||
import {
|
||||
resolveProvider,
|
||||
resolveProviderChain,
|
||||
} from "@/lib/ai/provider";
|
||||
import { resolveProvider, resolveProviderChain } from "@/lib/ai/provider";
|
||||
import { runRawCompletionWithFallback } from "@/lib/ai/provider-runner";
|
||||
import { assertConsentForChain } from "@/lib/ai/consent-guard";
|
||||
|
||||
@@ -136,9 +135,7 @@ describe("POST /api/medications/extract — rate limit", () => {
|
||||
remaining: 0,
|
||||
resetAt: Date.now() + 60_000,
|
||||
});
|
||||
const res = await POST(
|
||||
postReq({ text: "Mounjaro 5mg weekly" }) as never,
|
||||
);
|
||||
const res = await POST(postReq({ text: "Mounjaro 5mg weekly" }) as never);
|
||||
expect(res.status).toBe(429);
|
||||
const body = await res.json();
|
||||
expect(body.error).toMatch(/Too many requests/i);
|
||||
@@ -233,9 +230,7 @@ describe("POST /api/medications/extract — validation + provider errors", () =>
|
||||
type: "none",
|
||||
} as never);
|
||||
|
||||
const res = await POST(
|
||||
postReq({ text: "Mounjaro 5mg weekly" }) as never,
|
||||
);
|
||||
const res = await POST(postReq({ text: "Mounjaro 5mg weekly" }) as never);
|
||||
expect(res.status).toBe(503);
|
||||
});
|
||||
|
||||
@@ -252,9 +247,7 @@ describe("POST /api/medications/extract — validation + provider errors", () =>
|
||||
fallbackHops: [],
|
||||
});
|
||||
|
||||
const res = await POST(
|
||||
postReq({ text: "Mounjaro 5mg weekly" }) as never,
|
||||
);
|
||||
const res = await POST(postReq({ text: "Mounjaro 5mg weekly" }) as never);
|
||||
expect(res.status).toBe(502);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user