From 99b4fde002d66fb1401d27f4b16b0df8c22d621a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 21 May 2026 12:40:26 +0200 Subject: [PATCH] fix(dashboard-suspense-test): align timezone regex with post-W-INFRA local-lift The audit-H4 regex still pinned the pre-W-INFRA Thread 2 form `useMemo(..., [user?.timezone])` while the production code lifts `user?.timezone` to a `userTimezone` local one line above the `useMemo` so the dep array stays stable. Update the test fixture to match the new dependency form. Closes senior C1 from the v1.4.40 QA round. --- src/app/__tests__/dashboard-suspense-boundaries.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/__tests__/dashboard-suspense-boundaries.test.ts b/src/app/__tests__/dashboard-suspense-boundaries.test.ts index 55e1eeb43..8b3f03e47 100644 --- a/src/app/__tests__/dashboard-suspense-boundaries.test.ts +++ b/src/app/__tests__/dashboard-suspense-boundaries.test.ts @@ -73,10 +73,12 @@ describe("v1.4.40 — dashboard per-cell Suspense boundaries", () => { it("memoises the hour-of-day derivation against user.timezone (audit-H4)", () => { const src = load(PAGE_PATH); // The greeting hour only changes when the user's timezone changes - // — a `useMemo` keyed on `user?.timezone` keeps the + // — a `useMemo` keyed on the lifted `userTimezone` local keeps the // `Intl.DateTimeFormat` instantiation off the per-render hot path. + // Post-W-INFRA Thread 2: `user?.timezone` is lifted to a `userTimezone` + // local one line above the `useMemo` so the dep array stays stable. expect(src).toMatch( - /const\s+hour\s*=\s*useMemo\([\s\S]*?\[\s*user\?\.timezone\s*\][\s\S]*?\);/, + /const\s+hour\s*=\s*useMemo\([\s\S]*?\[\s*userTimezone\s*\][\s\S]*?\);/, ); }); });