aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_spa_ordering.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_spa_ordering.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_spa_ordering.py')
-rw-r--r--packages/meshbay-hub/tests/test_spa_ordering.py7
1 files changed, 4 insertions, 3 deletions
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"