Files
the-beacon/tests/test_readme_runtime_map.py
Alexander Whitestone c815f1e9e3
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Successful in 3s
Smoke Test / smoke (pull_request) Failing after 7s
docs: fix README runtime map for #169
2026-04-17 02:24:02 -04:00

19 lines
549 B
Python

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
runtime_modules = re.findall(r'<script src="(js/[^"]+\.js)"></script>', index)
assert runtime_modules, "expected split JS runtime modules in index.html"
for module in runtime_modules:
assert f"`{module}`" in readme, module