()
| 928 | |
| 929 | #[test] |
| 930 | fn test_turn_event_serde_roundtrip() { |
| 931 | let event = TurnEvent::new("sess-1", HookType::TurnStart) |
| 932 | .with_prompt("hello") |
| 933 | .with_transcript_path("/tmp/t.jsonl"); |
| 934 | |
| 935 | let json = serde_json::to_string(&event).unwrap(); |
| 936 | let parsed: TurnEvent = serde_json::from_str(&json).unwrap(); |
| 937 | |
| 938 | assert_eq!(parsed.session_id, event.session_id); |
| 939 | assert_eq!(parsed.event_type, event.event_type); |
| 940 | assert_eq!(parsed.prompt, event.prompt); |
| 941 | assert_eq!(parsed.transcript_path, event.transcript_path); |
| 942 | } |
| 943 | |
| 944 | #[test] |
| 945 | fn test_turn_event_serde_skips_none_fields() { |
nothing calls this directly
no test coverage detected