-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Context
Parent: #160
JSON field naming inconsistency (#149) was missed because tests check individual fields exist but never validate that struct field names match the serialized JSON schema end-to-end. Report types have to_json() and to_terminal() methods but no tests verify the full output shape.
Expected Behavior
Tests that serialize reports to JSON, deserialize into serde_json::Value, and assert the complete field structure matches a spec. Optionally, snapshot tests (via insta) that catch any unintentional output changes.
Scope
- Add round-trip tests for every report type:
TraceReport,ChainReport,CutReport,DiffReport,PackagesReport - Each test: build a report from a fixture, call
to_json(), parse the JSON, assert all field names and types - Consider adding
instafor snapshot testing of both JSON and terminal output - Assert field name consistency across report types (e.g., weight fields always use
_bytessuffix) - Assert that
to_terminal()andto_json()contain equivalent information
Reactions are currently unavailable