fix: tolerate unavailable browser timezone data
This commit is contained in:
1 parent
7deb1c1de9
commit
7c2e9861d7
2 files changed
+23
-2
No files matched your search
@@ -124,6 +124,20 @@ console.log(JSON.stringify({checks,delays:timers.map(timer=>timer.delay),cleared
|
||||
assert result["cleared"] == [1, 2]
|
||||
|
||||
|
||||
def test_tomorrow_rollover_falls_back_when_the_reported_timezone_is_invalid():
|
||||
result = run_controller("""
|
||||
let scheduled=null;
|
||||
const planner=createTomorrowPlan({fetchJson:async()=>({}),localDate:()=> '2026-08-20',timeZone:()=> 'Etc/Unknown'});
|
||||
const lifecycle=planner.startLifecycle({
|
||||
check:async()=>false,setTimer:(_fn,delay)=>{scheduled=delay;return 1;},clearTimer:()=>{},
|
||||
});
|
||||
await lifecycle.run();
|
||||
console.log(JSON.stringify({scheduled:Number.isFinite(scheduled)&&scheduled>0}));
|
||||
""")
|
||||
|
||||
assert result == {"scheduled": True}
|
||||
|
||||
|
||||
def test_tomorrow_plan_has_a_touch_safe_mobile_entry_and_reuses_the_ordered_planner():
|
||||
index = INDEX.read_text()
|
||||
css = CSS.read_text()
|
||||
|
||||
Reference in new issue
Block a user