test(#4813): resolve node via shutil.which + skip if absent (CI portability)

The hardcoded /home/hermes/.local/bin/node doesn't exist in CI runners. Use
shutil.which('node') with a module-level skipif, matching the repo's other
node-driven tests.
This commit is contained in:
nesquena-hermes committed 2026-06-24 11:07:54 +00:00
1 parent eb331b5163
commit f84db40a23
1 file changed
+5 -1
+5 -1
View File
@@ -9,12 +9,16 @@ prefixed value was saved and the cron model override broke.
from __future__ import annotations
import json
import shutil
import subprocess
from pathlib import Path
import pytest
REPO = Path(__file__).resolve().parents[1]
PANELS_JS = (REPO / "static" / "panels.js").read_text(encoding="utf-8")
NODE = "/home/hermes/.local/bin/node"
NODE = shutil.which("node")
pytestmark = pytest.mark.skipif(NODE is None, reason="node not available")
def _fn_body(name: str) -> str: