From 4abb0469fd32c59da1af00c90887cabb59dd6e4c Mon Sep 17 00:00:00 2001 From: Raúl Benencia Date: Thu, 4 Jun 2026 13:13:07 -0300 Subject: fix: add min required node version in smoke test --- test/integ-test/integ_test.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/integ-test/integ_test.py') diff --git a/test/integ-test/integ_test.py b/test/integ-test/integ_test.py index ca1c90e..a821551 100755 --- a/test/integ-test/integ_test.py +++ b/test/integ-test/integ_test.py @@ -97,6 +97,16 @@ def wait_for_shoelaces(): time.sleep(1) +def check_frontend_node_support(): + supported = subprocess.call(["node", "-e", """ +const [major, minor] = process.versions.node.split('.').map(Number); +process.exit((major > 22 || (major === 22 && minor >= 4)) && typeof WebSocket === 'function' ? 0 : 1); +"""]) == 0 + if not supported: + pytest.skip("node >= 22.4.0 with global WebSocket is required for the frontend smoke test") + + + def test_shoelaces_startup(shoelaces_instance): """ Test API liveness """ wait_for_shoelaces() @@ -114,6 +124,7 @@ def test_frontend_browser_smoke(shoelaces_instance): pytest.skip("node is required for the frontend smoke test") if shutil.which("chromium") is None: pytest.skip("chromium is required for the frontend smoke test") + check_frontend_node_support() wait_for_shoelaces() script = os.path.join(TEST_DIR, "frontend_smoke.js") -- cgit v1.2.3