refactor: establish standalone application boundary

This commit is contained in:
leefer
2026-08-03 21:42:25 +08:00
parent 656f28a96d
commit d6def3af15
322 changed files with 73872 additions and 44656 deletions
+4 -3
View File
@@ -4,6 +4,7 @@ import unittest
from pathlib import Path
from database import ReviewDatabase
from tests.frontend_test_helpers import registered_frontend_runtime_scripts
APP_ROOT = Path(__file__).resolve().parents[1]
@@ -16,9 +17,9 @@ class CleanupContractTests(unittest.TestCase):
self.assertFalse((FRONTEND_ROOT / "heaven-loading.js").exists())
def test_only_active_heaven_loading_asset_is_loaded(self) -> None:
html = (FRONTEND_ROOT / "index.html").read_text(encoding="utf-8")
self.assertIn('src="/pages/heaven/loading-v2.js', html)
self.assertNotIn('src="/heaven-loading.js', html)
scripts = registered_frontend_runtime_scripts()
self.assertTrue(any(path.startswith("/pages/heaven/loading-v2.js") for path in scripts))
self.assertFalse(any(path.startswith("/heaven-loading.js") for path in scripts))
def test_audited_definition_only_functions_stay_absent(self) -> None:
runtime = "\n".join(