diff options
| author | Raúl Benencia <id@rbenencia.name> | 2026-06-04 13:13:07 -0300 |
|---|---|---|
| committer | Raul Benencia <46945030+raul-te@users.noreply.github.com> | 2026-06-04 16:54:47 -0300 |
| commit | 4abb0469fd32c59da1af00c90887cabb59dd6e4c (patch) | |
| tree | c5d8b15da3fcb7ebd3bb14da9e4dc245386eb7d5 /test/integ-test/integ_test.py | |
| parent | 1668a8c01763c39dd91c39f98ffe36670ba8c612 (diff) | |
fix: add min required node version in smoke test
Diffstat (limited to 'test/integ-test/integ_test.py')
| -rwxr-xr-x | test/integ-test/integ_test.py | 11 |
1 files changed, 11 insertions, 0 deletions
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") |
