Files
the-beacon/tests/test_readme_runtime_map.py

19 lines
549 B
Python
Raw Normal View History

2026-04-17 02:24:02 -04:00
import re
from pathlib import Path
README = Path("README.md")
INDEX = Path("index.html")
def test_readme_runtime_map_matches_split_js_runtime() -> None:
readme = README.read_text(encoding="utf-8")
index = INDEX.read_text(encoding="utf-8")
assert "`game.js` — Core engine" not in readme
2026-04-17 02:24:02 -04:00
runtime_modules = re.findall(r'<script src="(js/[^"]+\.js)"></script>', index)
assert runtime_modules, "expected split JS runtime modules in index.html"
2026-04-17 02:24:02 -04:00
for module in runtime_modules:
assert f"`{module}`" in readme, module