From f032255f5495350fff9460019ab5179c6a72726b Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Tue, 17 Nov 2026 19:09:29 -0800 Subject: [PATCH] Pin the clock in the weather panel's identical-updates test Ages read in whole minutes, so a real clock crossing a minute between the two identical updates rewrote six lines and failed the test under load. --- src/ui/weatherPanel.test.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ui/weatherPanel.test.mjs b/src/ui/weatherPanel.test.mjs index 4427e0bcdd..b6e54e0e90 100644 --- a/src/ui/weatherPanel.test.mjs +++ b/src/ui/weatherPanel.test.mjs @@ -216,7 +216,13 @@ test('cyclone readout retains advisory, position, intensity, geometry, coverage, assert.equal(f.find((n) => n.className === 'rail-card-ramp').hidden, true); view.destroy(); }); -test('identical updates write nothing and status keeps its line through loading and empty text', () => { +test('identical updates write nothing and status keeps its line through loading and empty text', (t) => { + // Ages read in whole minutes: a real clock crossing a minute between the two + // updates would rightly rewrite them. + t.mock.timers.enable({ + apis: ['Date'], + now: Date.parse('2026-09-22T01:17:00Z'), + }); const f = fixture(); const view = createWeatherPanel(f); for (const entries of [