From 6348698322e5bfcb80d0ef0dcd833ba4e6179640 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Fri, 25 Sep 2026 11:09:12 +0200 Subject: 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 --- packages/meshbay-hub/tests/test_desktop_shell.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'packages/meshbay-hub/tests/test_desktop_shell.py') 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" -- cgit v1.2.3