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_spa_ordering.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'packages/meshbay-hub/tests/test_spa_ordering.py') diff --git a/packages/meshbay-hub/tests/test_spa_ordering.py b/packages/meshbay-hub/tests/test_spa_ordering.py index 1c36d09..087298f 100644 --- a/packages/meshbay-hub/tests/test_spa_ordering.py +++ b/packages/meshbay-hub/tests/test_spa_ordering.py @@ -20,6 +20,7 @@ that nothing reads a value assigned later — and then move the markers. from pathlib import Path import pytest +from spa_source import transport_source STATIC = (Path(__file__).resolve().parents[1] / "src" / "meshbay_hub" / "static") @@ -30,7 +31,7 @@ pytestmark = pytest.mark.skipif( def _positions(*needles: str) -> list[int]: - source = TRANSPORT.read_text() + source = transport_source() out = [] for needle in needles: idx = source.find(needle) @@ -96,7 +97,7 @@ def test_the_ack_still_verifies_the_announced_node_key(): the client compares the two. Losing that check would leave the announcement trusted on its own. """ - source = TRANSPORT.read_text() + source = transport_source() assert "Node identity changed during the handshake" in source, ( "the challenge's node_pk must be checked against the ack's") assert "verifyNodeSignature" in source, ( @@ -214,7 +215,7 @@ def test_admin_page_does_not_borrow_the_group_settings_state(): # waiting for every ack, 3.47 MB/s with 32 chunks in flight. def test_the_uploader_keeps_several_chunks_in_flight(): - src = TRANSPORT.read_text() + src = transport_source() body = src[src.index("async uploadFile("):] body = body[:body.index("\n async ", 1)] assert "UPLOAD_WINDOW" in body, "the send window is gone — uploads are serial again" -- cgit v1.2.3