mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 15:42:24 +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
@@ -145,7 +145,9 @@ describe("createReceipt", () => {
|
||||
// The prior row's revocation must be stamped "now", never the backdated
|
||||
// client value, so the audit chain can't be inverted.
|
||||
expect(supersedeArg.data.revokedAt.getTime()).not.toBe(backdated.getTime());
|
||||
expect(supersedeArg.data.revokedAt.getTime()).toBeGreaterThanOrEqual(before);
|
||||
expect(supersedeArg.data.revokedAt.getTime()).toBeGreaterThanOrEqual(
|
||||
before,
|
||||
);
|
||||
expect(supersedeArg.data.revokedAt.getTime()).toBeLessThanOrEqual(after);
|
||||
// The new row still carries the client signedAt.
|
||||
const createArg = vi.mocked(prisma.consentReceipt.create).mock.calls[0][0];
|
||||
@@ -155,7 +157,9 @@ describe("createReceipt", () => {
|
||||
|
||||
describe("latestActiveReceipt", () => {
|
||||
it("filters by user + kind + revokedAt:null and orders by createdAt desc", async () => {
|
||||
vi.mocked(prisma.consentReceipt.findFirst).mockResolvedValue(row() as never);
|
||||
vi.mocked(prisma.consentReceipt.findFirst).mockResolvedValue(
|
||||
row() as never,
|
||||
);
|
||||
|
||||
const result = await latestActiveReceipt("user-1", "ai_full");
|
||||
|
||||
|
||||
@@ -78,7 +78,9 @@ describe("ensureWebAiConsentReceipt", () => {
|
||||
});
|
||||
|
||||
it("is a no-op when an active ai_full receipt already exists", async () => {
|
||||
vi.mocked(prisma.consentReceipt.findFirst).mockResolvedValue(row() as never);
|
||||
vi.mocked(prisma.consentReceipt.findFirst).mockResolvedValue(
|
||||
row() as never,
|
||||
);
|
||||
|
||||
const result = await ensureWebAiConsentReceipt("user-1");
|
||||
|
||||
@@ -136,8 +138,9 @@ describe("ensureWebAiConsentReceipt — two concurrent grants", () => {
|
||||
// inserts; the second sees the now-filled slot and no-ops.
|
||||
let activeRow: ReturnType<typeof row> | null = null;
|
||||
|
||||
vi.mocked(prisma.consentReceipt.findFirst).mockImplementation((async () =>
|
||||
activeRow) as never);
|
||||
vi.mocked(prisma.consentReceipt.findFirst).mockImplementation(
|
||||
(async () => activeRow) as never,
|
||||
);
|
||||
vi.mocked(prisma.consentReceipt.create).mockImplementation((async () => {
|
||||
activeRow = row();
|
||||
return activeRow;
|
||||
|
||||
Reference in new issue
Block a user