21 lines
598 B
Python
21 lines
598 B
Python
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
import shutil
|
|
import subprocess
|
|
|
|
import pytest
|
|
|
|
|
|
NODE = shutil.which("node")
|
|
APP_JS = Path("src/yolo_webui/static/app.js")
|
|
|
|
|
|
@pytest.mark.skipif(NODE is None, reason="Node.js is required for frontend checks")
|
|
def test_frontend_javascript_syntax() -> None:
|
|
subprocess.run([NODE, "--check", str(APP_JS)], check=True)
|
|
|
|
|
|
@pytest.mark.skipif(NODE is None, reason="Node.js is required for frontend checks")
|
|
def test_frontend_zero_values_and_dynamic_chart_series() -> None:
|
|
subprocess.run([NODE, "tests/frontend_smoke.js"], check=True)
|