Skip to content

Commit 5aed0cc

Browse files
committed
fix broken tests
1 parent 5c6cff5 commit 5aed0cc

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tests/test_asgi/test_middleware.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,15 @@ def Stub():
8080

8181
# Wait for the log record to be populated
8282
for _ in range(10):
83-
if len(server.log_records) > 0:
83+
if "Attempting to use an unregistered root component" in " ".join(
84+
x.message for x in server.log_records
85+
):
8486
break
8587
await asyncio.sleep(0.25)
8688

8789
# Check that the log record was populated with the "unregistered component" message
88-
assert (
89-
"Attempting to use an unregistered root component"
90-
in server.log_records[-1].message
90+
assert "Attempting to use an unregistered root component" in " ".join(
91+
x.message for x in server.log_records
9192
)
9293

9394

tests/test_reactjs/test_modules_from_npm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from reactpy.reactjs import component_from_npm, import_reactjs
77
from reactpy.testing import GITHUB_ACTIONS, BackendFixture, DisplayFixture
88

9-
MISSING_IMPORT_MAP_MSG = "ReactPy did not detect a suitable import map on your page."
9+
MISSING_IMPORT_MAP_MSG = "ReactPy did not detect a suitable JavaScript import map"
1010

1111

1212
@pytest.fixture(scope="module")

0 commit comments

Comments
 (0)