Keep group chat session cache loading (#1418)

This commit is contained in:
red person
2026-06-02 22:05:40 +03:00
committed by GitHub
parent 0ec8415f0e
commit 5fd71f68e8
2 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
from pathlib import Path
SOURCE = (
Path(__file__).resolve().parent.parent / "static" / "js" / "group.js"
).read_text(encoding="utf-8")
def test_group_session_sidebar_cache_uses_safe_json_loader():
assert "import Storage from './storage.js';" in SOURCE
assert "Storage.getJSON('odysseus-group-sessions', [])" in SOURCE
assert "Array.isArray(storedGroupSessions)" in SOURCE
assert "JSON.parse(localStorage.getItem('odysseus-group-sessions')" not in SOURCE