fleet-memory/hindsight-integrations/claude-code/tests/test_manifest.py
Nicolò Boschi 704e41fa27
Fix trailing commas in openclaw.plugin.json and add JSON manifest CI tests (#774)
Fixes #771 — two trailing commas in openclaw.plugin.json caused OpenClaw's
strict JSON parser to reject the plugin manifest during installation.

Also adds JSON validation tests for both the openclaw plugin manifest and
the claude-code hooks.json so CI catches invalid JSON before release.
2026-03-30 16:55:06 +02:00

14 lines
399 B
Python

"""Validate that JSON manifests are strict-valid JSON (no trailing commas, etc.)."""
import json
from pathlib import Path
INTEGRATION_ROOT = Path(__file__).resolve().parent.parent
def test_hooks_json_is_valid():
path = INTEGRATION_ROOT / "hooks" / "hooks.json"
raw = path.read_text()
parsed = json.loads(raw)
assert "hooks" in parsed
assert isinstance(parsed["hooks"], dict)