diff options
Diffstat (limited to 'packages/meshbay-hub/tests/test_video_stream_switch.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_video_stream_switch.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/meshbay-hub/tests/test_video_stream_switch.py b/packages/meshbay-hub/tests/test_video_stream_switch.py index 464d1f7..80d9421 100644 --- a/packages/meshbay-hub/tests/test_video_stream_switch.py +++ b/packages/meshbay-hub/tests/test_video_stream_switch.py @@ -35,7 +35,7 @@ from pathlib import Path import pytest STATIC = Path(__file__).resolve().parents[1] / "src" / "meshbay_hub" / "static" -APP = STATIC / "app.js" +APP = STATIC / "video-player.js" pytestmark = pytest.mark.skipif( shutil.which("node") is None or not APP.exists(), @@ -49,7 +49,8 @@ def app(): def _player(app: str) -> str: i = app.index("function VideoPlayer(") - return app[i:app.index("\nfunction ", i + 1)] + nxt = app.find("\nfunction ", i + 1) + return app[i:nxt if nxt > 0 else len(app)] # ── The flag that stalled everything ────────────────────────────────────────── |