refactor: establish standalone application boundary
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user