sh2/d2ypp2/tests/test_web_console_quality_gate.py
eric 9888f1daad Harden YouTube unmanned live stack and hide advanced console panels.
Fix Pro config SSOT, event FSM, FFmpeg error tiers, relay heartbeat, and ingest auth while keeping relay snapshot, quality guard, and event hub hidden in the UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 06:31:31 -05:00

34 lines
1.3 KiB
Python

from __future__ import annotations
import json
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
def test_next_build_does_not_skip_lint_or_typecheck() -> None:
config = (ROOT / "web-console" / "next.config.mjs").read_text(encoding="utf-8")
assert "ignoreBuildErrors" not in config
assert "ignoreDuringBuilds" not in config
def test_next_config_uses_dev_rewrites_instead_of_middleware() -> None:
config = (ROOT / "web-console" / "next.config.mjs").read_text(encoding="utf-8")
assert not (ROOT / "web-console" / "middleware.ts").exists()
assert "nextConfig.rewrites" in config
assert "process.env.NODE_ENV === \"development\"" in config
assert "/process_monitor" in config
assert "/shellcrash/apply_profile" in config
def test_package_scripts_expose_full_project_checks() -> None:
root_pkg = json.loads((ROOT / "package.json").read_text(encoding="utf-8"))
console_pkg = json.loads((ROOT / "web-console" / "package.json").read_text(encoding="utf-8"))
assert root_pkg["scripts"]["check"] == "python -m pytest -q && pnpm -C web-console run check"
assert console_pkg["scripts"]["typecheck"] == "tsc --noEmit"
assert console_pkg["scripts"]["check"] == "pnpm run lint && pnpm run typecheck && pnpm run build"