ReviewOS

also looking at this

zig-utils/zig-test-framework

Define stable JSON event protocol

#27
Merged glennmichael123 wants to merge codex/issue-10-json-events into main
11 files +442 -177
README.mdmodified+19-14
Changes to README.md
@@ -820,28 +820,33 @@ Passed: 12, Failed: 0, Total: 12 (1.23ms)
820820
821821### JSON Reporter
822822
823Machine-readable output for tooling:
823Machine-readable output uses the versioned event protocol shared with the live
824UI and test history:
824825
825826```json
826{
827 "totalTests": 12,
828 "tests": [
829 {
827[
828 {
829 "protocol_version": 1,
830 "type": "run_start",
831 "data": { "total": 12 }
832 },
833 {
834 "protocol_version": 1,
835 "type": "test_end",
836 "data": {
830837 "name": "should add two numbers",
838 "suite": "Math operations",
831839 "status": "passed",
832 "time": 0.05
840 "duration_ns": 50000,
841 "error_message": null
833842 }
834 ],
835 "summary": {
836 "total": 12,
837 "passed": 12,
838 "failed": 0,
839 "skipped": 0,
840 "time": 1.23
841843 }
842}
844]
843845```
844846
847See [docs/json-event-protocol.md](docs/json-event-protocol.md) for every event
848type and the compatibility policy.
849
845850## API Reference
846851
847852See [docs/api.md](docs/api.md) for complete API documentation.