From 801aa73de0a8eed0130830b6a04282751a1619c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 9 Jul 2026 00:04:21 +0200 Subject: [PATCH] style: prettier formatting --- .../google-health/__tests__/sync-metrics-failsoft.test.ts | 7 ++++--- .../__tests__/daily-series-read-tiered.test.ts | 4 +++- src/lib/oura/sync.ts | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/lib/google-health/__tests__/sync-metrics-failsoft.test.ts b/src/lib/google-health/__tests__/sync-metrics-failsoft.test.ts index ccb60412a..601ea4ddd 100644 --- a/src/lib/google-health/__tests__/sync-metrics-failsoft.test.ts +++ b/src/lib/google-health/__tests__/sync-metrics-failsoft.test.ts @@ -52,10 +52,11 @@ beforeEach(() => { mapWeightMock.mockClear(); // Weight returns one point (whose mapper throws); everything else is empty so // its real mapper is never exercised. - fetchDataPointsMock.mockReset().mockImplementation( - async (_dt: unknown, _token: string, verb: string) => + fetchDataPointsMock + .mockReset() + .mockImplementation(async (_dt: unknown, _token: string, verb: string) => verb === "fetchWeight" ? [{ any: "point" }] : [], - ); + ); }); describe("syncUserMetrics — a throwing mapper never skips sibling types", () => { diff --git a/src/lib/measurements/__tests__/daily-series-read-tiered.test.ts b/src/lib/measurements/__tests__/daily-series-read-tiered.test.ts index f8f09d0bd..c23d7030a 100644 --- a/src/lib/measurements/__tests__/daily-series-read-tiered.test.ts +++ b/src/lib/measurements/__tests__/daily-series-read-tiered.test.ts @@ -165,7 +165,9 @@ describe("readDailySeries — rollup read throw falls back to live SQL (F-DB-2)" const from = new Date(to.getTime() - 90 * DAY_MS); // The primary rollup read throws (statement_timeout / deadlock / reset). - mocks.findMany.mockReset().mockRejectedValue(new Error("statement timeout")); + mocks.findMany + .mockReset() + .mockRejectedValue(new Error("statement timeout")); // Live fallback serves the tile. mocks.queryRaw.mockResolvedValueOnce([ { diff --git a/src/lib/oura/sync.ts b/src/lib/oura/sync.ts index 5c584433a..80ddc2834 100644 --- a/src/lib/oura/sync.ts +++ b/src/lib/oura/sync.ts @@ -275,7 +275,8 @@ async function fetchAll( rotated.refresh_token, refreshTokenCiphertext, ); - if (!usableToken) return { readings: first.readings, failures: first.failures }; + if (!usableToken) + return { readings: first.readings, failures: first.failures }; const retry = await attempt(usableToken, first.failed); return {