mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 05:12:14 +00:00
test: drop vi imports the removed schema-mirror mocks left unused
This commit is contained in:
1 parent
df1e19f1c2
commit
3d1a6224ba
33 files changed
+33
-41
No files matched your search
@@ -8,7 +8,7 @@
|
||||
* - a workout two devices recorded counts once, its minutes once;
|
||||
* - the window is exact: nothing before `fromKey` or after `toKey`.
|
||||
*/
|
||||
import { beforeAll, describe, expect, it, vi } from "vitest";
|
||||
import { beforeAll, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
import { readActivityDays } from "@/lib/activity/calendar-read";
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* token without an expiry all stay. The delete is batched and says when it
|
||||
* stopped with rows left.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { cleanupAuthLedgers } from "@/lib/jobs/auth-ledger-cleanup";
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import { createHash, randomBytes } from "node:crypto";
|
||||
import v8 from "node:v8";
|
||||
import vm from "node:vm";
|
||||
|
||||
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
|
||||
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
||||
|
||||
process.env.ENCRYPTION_KEY ??=
|
||||
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef";
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
import v8 from "node:v8";
|
||||
import vm from "node:vm";
|
||||
|
||||
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
|
||||
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ import { once } from "node:events";
|
||||
import v8 from "node:v8";
|
||||
import vm from "node:vm";
|
||||
|
||||
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
|
||||
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
||||
|
||||
import { cookieJar, headerJar } from "./mock-next-headers";
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* (`readDayAggregates`); this proves that path finds a step, reports its
|
||||
* segment sizes, and leaves a switched-off module's metric unread.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
import { buildExtendedChangepointSignals } from "@/lib/insights/derived/changepoint";
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* The fixture is the reported case: a fortnight of glucose readings from April
|
||||
* 2024, deliberately outside every window the Coach can search.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
import { probeCoachAvailability } from "@/lib/ai/coach/tools/availability";
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
* either compare a bucket's `computedAt` against the type's in-window
|
||||
* MAX(`updatedAt`), or invalidate on the hard-delete path — and that is a
|
||||
* larger change than this honesty repair.
|
||||
*/ import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
*/ import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
process.env.ENCRYPTION_KEY ??=
|
||||
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef";
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* (`AppSettings.correlationSeasonalEngineSince`), which the first discovery
|
||||
* sync of the new engine stamps before it writes, not by a calendar date.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
import {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* with two sources on the same days, two device types within one source,
|
||||
* dense CGM glucose, summed steps and readings next to Berlin midnight.
|
||||
*/
|
||||
import { beforeAll, describe, expect, it, vi } from "vitest";
|
||||
import { beforeAll, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
import { readSourceDayAggregates } from "@/lib/measurements/day-aggregates";
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* AI provider is the subject on purpose: the overview has to be whole
|
||||
* without one.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import type { Prisma } from "@/generated/prisma/client";
|
||||
import { loadDailyDigest } from "@/lib/daily/load-digest";
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* the live instance has it, and asserts that the daily series (both the
|
||||
* rollup-backed read and the live aggregate) buckets by the user's day.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
import {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* day-to-day steps around 1 to 2 mmHg outside the climb and the fall). The
|
||||
* peak also has a ceiling: past 148 the chart's padded axis jumps to 50-200.
|
||||
*/
|
||||
import { beforeAll, describe, expect, it, vi } from "vitest";
|
||||
import { beforeAll, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* holds every Withings and Apple Health row against the type maps those
|
||||
* integrations ingest through.
|
||||
*/
|
||||
import { beforeAll, describe, expect, it, vi } from "vitest";
|
||||
import { beforeAll, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
import { APPLE_HEALTH_TYPE_MAP } from "@/lib/measurements/apple-health-mapping";
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
import v8 from "node:v8";
|
||||
import vm from "node:vm";
|
||||
|
||||
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
|
||||
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
import { buildGradedSeriesWithRollups } from "@/lib/insights/graded-series";
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
* dashboard composes (`computeDisplayDue` + the taken/scheduled tally) reflects
|
||||
* the correct state.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* 2. Marking the morning dose does NOT mark the evening dose (the evening
|
||||
* slot stays pending) and vice-versa.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* 4. taken > skipped tie-break keeps the taken row.
|
||||
* 5. Boot discovery only matches users that actually hold duplicates.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* 23:30 UTC is the next day in Berlin and still the same day in Los Angeles,
|
||||
* a reading at 03:00 UTC is the previous day in Los Angeles.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
import { readActivityDayKeys } from "@/lib/dashboard/summary-reads";
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* that the recovery-code burn is durable and one-time, and that the challenge
|
||||
* ticket can be claimed exactly once. This exercises all three end to end.
|
||||
*/
|
||||
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
import * as OTPAuth from "otpauth";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Exercises the widened measurement `type: { in: [...] }` filter and the
|
||||
* structured-tag join end-to-end against Postgres.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
import { fetchMoodAggregates } from "@/lib/insights/mood-aggregates";
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* Postgres cannot arbiter against a partial unique). See migration 0121's
|
||||
* header for the full rationale.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
process.env.ENCRYPTION_KEY ??=
|
||||
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef";
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* best day sits in the middle of the history, and no read of the history is
|
||||
* unbounded.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* of going through pg-boss so the integration suite stays free of
|
||||
* out-of-process job-queue plumbing.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* day, deleted outright, expires the account's delta cursors. An Apple
|
||||
* Health fold expires nothing.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { upsertGoogleHealthMeasurements } from "@/lib/google-health/sync-core";
|
||||
import { runDenseIntradayRetention } from "@/lib/measurements/dense-intraday-retention";
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* digest's Day N, and the achievements streak freeze, which runs its own
|
||||
* episode query.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import type { Prisma } from "@/generated/prisma/client";
|
||||
import { __resetAllCachesForTests } from "@/lib/cache/server-cache";
|
||||
|
||||
@@ -28,15 +28,7 @@
|
||||
* consolidation's day transaction and the first test fails with the
|
||||
* consolidation rejected on `40P01`.
|
||||
*/
|
||||
import {
|
||||
afterAll,
|
||||
afterEach,
|
||||
beforeEach,
|
||||
describe,
|
||||
expect,
|
||||
it,
|
||||
vi,
|
||||
} from "vitest";
|
||||
import { afterAll, afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
import { acceptingBoss } from "./restore-job-driver";
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* it; a purged visit cascades its links; a start folded into a live cycle
|
||||
* stays; the coach facts keep their longer horizon.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { TOMBSTONE_RETENTION_DAYS } from "@/lib/auth/native-client";
|
||||
import {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* Health, and a day between two sources that were on the ladder before
|
||||
* resolves exactly as it did.
|
||||
*/
|
||||
import { beforeAll, describe, expect, it, vi } from "vitest";
|
||||
import { beforeAll, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
import type {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* day values count asleep stages only, and the comparison lines the two
|
||||
* sources up per day.
|
||||
*/
|
||||
import { beforeAll, describe, expect, it, vi } from "vitest";
|
||||
import { beforeAll, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
import {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* readings on that local day, 08:00 PDT (15:00Z) and 23:30 PDT (06:30Z on
|
||||
* the 9th), must form one bucket for the 8th.
|
||||
*/
|
||||
import { beforeAll, describe, expect, it, vi } from "vitest";
|
||||
import { beforeAll, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* call one: CORE + DEEP + REM of the night's winning writer, IN_BED and
|
||||
* AWAKE left out, keyed by its wake day.
|
||||
*/
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* `purgeTombstonesByAccount` and the purge waits out the hold, then deletes
|
||||
* the restoring account's tombstones once the stand-in rolls back.
|
||||
*/
|
||||
import { afterAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { afterAll, beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
|
||||
|
||||
Reference in new issue
Block a user