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.
14 lines
399 B
Python
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)
|