"""DOC-08 — PUBLIC_API.json MUST match the generator's output."""

from __future__ import annotations

import json
from pathlib import Path

from tools.generate_public_api_json import build_payload  # type: ignore[import-not-found]

_JSON = Path(__file__).resolve().parents[2] / "PUBLIC_API.json"


def test_exists() -> None:
    assert _JSON.exists()


def test_matches_generator() -> None:
    assert json.loads(_JSON.read_text(encoding="utf-8")) == build_payload()
