mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 06:32:03 +00:00
Merge remote-tracking branch 'origin/main' into release/v1.47.5
# Conflicts: # src/__tests__/baselines/source-file-lines.json # src/__tests__/baselines/source-function-lines.json # src/__tests__/baselines/test-as-never.json # src/__tests__/baselines/version-stamp-comments.json # src/__tests__/sharing-surface-guard.test.ts
This commit is contained in:
commit
5ac998e4f0
112 files changed
+1816
-593
No files matched your search
@@ -18,6 +18,8 @@ process.env.ENCRYPTION_KEY ??=
|
||||
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef";
|
||||
|
||||
import { POST as createVaccination } from "@/app/api/vaccinations/route";
|
||||
import { dateOnlyKey } from "@/lib/tz/date-only";
|
||||
import { startOfLocalDayKey } from "@/lib/tz/local-day";
|
||||
import { POST as mintBooster } from "@/app/api/vaccinations/[id]/booster/route";
|
||||
import { GET as listReminders } from "@/app/api/measurement-reminders/route";
|
||||
|
||||
@@ -221,7 +223,10 @@ describe("the whole activity-aware loop, through real routes", () => {
|
||||
const after = await prisma.measurementReminder.findUniqueOrThrow({
|
||||
where: { id: reminderId },
|
||||
});
|
||||
expect(after.lastSatisfiedAt?.toISOString()).toBe(occurredAt.toISOString());
|
||||
// The start of the dose's calendar day in the person's zone.
|
||||
expect(after.lastSatisfiedAt).toEqual(
|
||||
startOfLocalDayKey(dateOnlyKey(occurredAt), "Europe/Berlin"),
|
||||
);
|
||||
expect(after.nextDueAt!.getTime()).toBeGreaterThan(
|
||||
before.nextDueAt!.getTime(),
|
||||
);
|
||||
|
||||
@@ -24,6 +24,8 @@ process.env.ENCRYPTION_KEY ??=
|
||||
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef";
|
||||
|
||||
import { POST as createVaccination } from "@/app/api/vaccinations/route";
|
||||
import { dateOnlyKey } from "@/lib/tz/date-only";
|
||||
import { startOfLocalDayKey } from "@/lib/tz/local-day";
|
||||
|
||||
import { cookieJar, headerJar } from "./mock-next-headers";
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
@@ -132,7 +134,10 @@ describe("a dose satisfies the boosters it answers", () => {
|
||||
expect(res.status, JSON.stringify(await res.clone().json())).toBe(201);
|
||||
|
||||
const after = await reminderById(reminder.id);
|
||||
expect(after.lastSatisfiedAt?.toISOString()).toBe(occurredAt.toISOString());
|
||||
// The start of the dose's calendar day in the person's zone.
|
||||
expect(after.lastSatisfiedAt).toEqual(
|
||||
startOfLocalDayKey(dateOnlyKey(occurredAt), "Europe/Berlin"),
|
||||
);
|
||||
// Re-anchored from the satisfy instant, so the next one lands roughly ten
|
||||
// years out rather than staying on the date it was already overdue on.
|
||||
expect(after.nextDueAt).not.toBeNull();
|
||||
|
||||
Reference in new issue
Block a user