()
| 102 | |
| 103 | #[test] |
| 104 | fn test_parse_session_start() { |
| 105 | let hook = make_hook(); |
| 106 | let input = br#"{"session_id": "sess-1", "transcript_path": "/tmp/t.jsonl"}"#; |
| 107 | let event = hook.parse_event(HookType::SessionStart, input).unwrap(); |
| 108 | |
| 109 | assert_eq!(event.session_id, "sess-1"); |
| 110 | assert_eq!(event.event_type, HookType::SessionStart); |
| 111 | assert_eq!(event.transcript_path, Some(PathBuf::from("/tmp/t.jsonl"))); |
| 112 | assert!(event.prompt.is_none()); |
| 113 | assert!(event.raw_json.is_some()); |
| 114 | } |
| 115 | |
| 116 | #[test] |
| 117 | fn test_parse_session_end() { |
nothing calls this directly
no test coverage detected