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'', index) assert runtime_modules, "expected split JS runtime modules in index.html" for module in runtime_modules: assert f"`{module}`" in readme, module