fix(11): make CI green — pin TZ in all-day scheduler tests, drop redundant casts
CI / changes (pull_request) Successful in 2s
CI / fast-checks (pull_request) Successful in 1m25s
CI / api (pull_request) Successful in 1m3s
CI / harness (pull_request) Successful in 4m14s
CI / security (pull_request) Successful in 41s
CI / gate (pull_request) Successful in 1s
CI / changes (pull_request) Successful in 2s
CI / fast-checks (pull_request) Successful in 1m25s
CI / api (pull_request) Successful in 1m3s
CI / harness (pull_request) Successful in 4m14s
CI / security (pull_request) Successful in 41s
CI / gate (pull_request) Successful in 1s
fast-checks failed on 3 no-unnecessary-type-assertion ESLint errors (reminderIsCustom is now a real CalendarOccurrence field). api failed on 4 all-day 9 AM-local tests that assumed a UTC-4 host; CI runs UTC. Pin process.env.TZ=America/New_York in the all-day describe (production code reads TZ at call time, D-04). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
156bdf057b
commit
eff9b13c66
@@ -659,8 +659,13 @@ describe('reminderScheduler — NOTIF-06: all-day 9 AM-local fire branch', () =>
|
||||
// All-day tests use the server timezone (America/New_York = UTC-4 in summer).
|
||||
// computeAlertInstantUtc('2026-06-15', 0, 'America/New_York') = 2026-06-15T13:00:00Z.
|
||||
// Tests set `now` to the expected alert UTC to trigger the fire window.
|
||||
// Pin TZ explicitly so these assertions are deterministic regardless of the host/CI
|
||||
// timezone (CI runs UTC; the scheduler reads process.env.TZ at call time, D-04).
|
||||
let prevTz: string | undefined;
|
||||
|
||||
beforeEach(() => {
|
||||
prevTz = process.env.TZ;
|
||||
process.env.TZ = 'America/New_York';
|
||||
vi.useFakeTimers();
|
||||
vi.resetModules();
|
||||
});
|
||||
@@ -668,6 +673,8 @@ describe('reminderScheduler — NOTIF-06: all-day 9 AM-local fire branch', () =>
|
||||
afterEach(() => {
|
||||
vi.useRealTimers();
|
||||
vi.clearAllMocks();
|
||||
if (prevTz === undefined) delete process.env.TZ;
|
||||
else process.env.TZ = prevTz;
|
||||
});
|
||||
|
||||
it('all-day 0-lead fires at 9 AM local (not midnight) on event date', async () => {
|
||||
|
||||
Reference in New Issue
Block a user