aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_desktop_shell.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-25 11:09:12 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-25 12:07:49 +0200
commit6348698322e5bfcb80d0ef0dcd833ba4e6179640 (patch)
tree6d4f47a0a1745ef5ae912368d078cf681b9fcd19 /packages/meshbay-hub/tests/test_desktop_shell.py
parent71ea15a926d02437a65b8d788834c46f4e6df9a3 (diff)
downloadmeshbay-6348698322e5bfcb80d0ef0dcd833ba4e6179640.tar.gz
test(hub): read the transport wherever it is split
spa_source.transport_files() takes the classic transport*.js scripts from the hub's shell, in load order. Every test that read transport.js reads them all, the Node harnesses run them joined as one scope, the chat probe loads each, and the desktop shell must load them in order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/tests/test_desktop_shell.py')
-rw-r--r--packages/meshbay-hub/tests/test_desktop_shell.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/meshbay-hub/tests/test_desktop_shell.py b/packages/meshbay-hub/tests/test_desktop_shell.py
index e6eefc2..b9b3319 100644
--- a/packages/meshbay-hub/tests/test_desktop_shell.py
+++ b/packages/meshbay-hub/tests/test_desktop_shell.py
@@ -18,6 +18,7 @@ import re
from pathlib import Path
import pytest
+from spa_source import transport_files
CLIENT = Path(__file__).resolve().parents[2] / "meshbay-client"
MAIN = CLIENT / "src" / "main.js"
@@ -402,6 +403,10 @@ def test_the_packaged_page_loads_the_shared_modules():
for module in ("keyderive.js", "crypto.js", "transport.js", "app.js",
"style.css", "argon2.min.js"):
assert module in page, f"{module} is not loaded by the packaged page"
+ # Every part of the transport, in the order the hub's shell loads them.
+ parts = [p.name for p in transport_files()]
+ at = [page.index(f'src="./{name}"') for name in parts]
+ assert at == sorted(at), f"the packaged page loads the transport out of order: {parts}"
assert "/a/" not in page, "the packaged page points at the hub's asset prefix"