From b333c1fccdab63f2984610c7df85d33b197d027a Mon Sep 17 00:00:00 2001 From: Brian Krabach Date: Sat, 4 Apr 2026 08:34:36 -0700 Subject: [PATCH] fix: update createNewSession regex tests to match 2-param signature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 5 pre-existing tests used \(\w+\) (single-param regex) but Task 4 changed createNewSession(name) → createNewSession(name, remoteId). Updated regex to \([\w,\s]+\) to match one or more comma-separated parameters. --- muxplex/tests/test_frontend_js.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/muxplex/tests/test_frontend_js.py b/muxplex/tests/test_frontend_js.py index 5ef8119..73c76dc 100644 --- a/muxplex/tests/test_frontend_js.py +++ b/muxplex/tests/test_frontend_js.py @@ -1672,7 +1672,7 @@ def test_show_new_session_input_handles_blur_with_delay() -> None: def test_create_new_session_posts_to_api_sessions() -> None: """createNewSession must POST to /api/sessions.""" match = re.search( - r"async function createNewSession\s*\(\w+\)\s*\{(.*?)(?=\nasync function |\nfunction |\n// )", + r"async function createNewSession\s*\([\w,\s]+\)\s*\{(.*?)(?=\nasync function |\nfunction |\n// )", _JS, re.DOTALL, ) @@ -1685,7 +1685,7 @@ def test_create_new_session_posts_to_api_sessions() -> None: def test_create_new_session_shows_toast() -> None: """createNewSession must call showToast.""" match = re.search( - r"async function createNewSession\s*\(\w+\)\s*\{(.*?)(?=\nasync function |\nfunction |\n// )", + r"async function createNewSession\s*\([\w,\s]+\)\s*\{(.*?)(?=\nasync function |\nfunction |\n// )", _JS, re.DOTALL, ) @@ -1697,7 +1697,7 @@ def test_create_new_session_shows_toast() -> None: def test_create_new_session_calls_poll_sessions() -> None: """createNewSession must call pollSessions.""" match = re.search( - r"async function createNewSession\s*\(\w+\)\s*\{(.*?)(?=\nasync function |\nfunction |\n// )", + r"async function createNewSession\s*\([\w,\s]+\)\s*\{(.*?)(?=\nasync function |\nfunction |\n// )", _JS, re.DOTALL, ) @@ -1709,7 +1709,7 @@ def test_create_new_session_calls_poll_sessions() -> None: def test_create_new_session_auto_opens_session() -> None: """createNewSession must call openSession when auto_open_created is not false.""" match = re.search( - r"async function createNewSession\s*\(\w+\)\s*\{(.*?)(?=\nasync function |\nfunction |\n// )", + r"async function createNewSession\s*\([\w,\s]+\)\s*\{(.*?)(?=\nasync function |\nfunction |\n// )", _JS, re.DOTALL, ) @@ -1724,7 +1724,7 @@ def test_create_new_session_auto_opens_session() -> None: def test_create_new_session_polls_before_open() -> None: """createNewSession must poll for the session to appear before calling openSession (not immediate setTimeout).""" match = re.search( - r"async function createNewSession\s*\(\w+\)\s*\{(.*?)(?=\nasync function |\nfunction |\n// )", + r"async function createNewSession\s*\([\w,\s]+\)\s*\{(.*?)(?=\nasync function |\nfunction |\n// )", _JS, re.DOTALL, )