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_app_settings_plugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages/meshbay-hub/tests/test_app_settings_plugin.py') diff --git a/packages/meshbay-hub/tests/test_app_settings_plugin.py b/packages/meshbay-hub/tests/test_app_settings_plugin.py index a1ecec7..a56d70f 100644 --- a/packages/meshbay-hub/tests/test_app_settings_plugin.py +++ b/packages/meshbay-hub/tests/test_app_settings_plugin.py @@ -17,6 +17,7 @@ from pathlib import Path import node_tree import pytest +from spa_source import transport_source STATIC = Path(__file__).resolve().parents[1] / "src" / "meshbay_hub" / "static" APPS = STATIC / "apps.js" @@ -195,7 +196,7 @@ def test_the_directory_op_is_signed_and_names_its_app(): indistinguishable — so the app is in the signed subject, and both sides build it the same way. """ - transport = TRANSPORT.read_text(encoding="utf-8") + transport = transport_source() body = transport[transport.index("async setAppDirectories("):] body = body[:body.index("\n async ", 1)] assert "admin_challenge" in body and "_authorizeAdminOp" in body @@ -378,7 +379,7 @@ def test_a_saved_setting_reaches_the_page_that_renders_the_pane(): the broadcast, and the one that asked went on showing an unsaved-looking draft. Clicking Save again just re-sent it. """ - transport = TRANSPORT.read_text(encoding="utf-8") + transport = transport_source() block = transport[transport.index("const BROADCAST_ACK_TYPES"):] block = block[:block.index("]);") + 3] for ack in ("chat_directory_ack", "chat_link_preview_ack", -- cgit v1.2.3