()
| 915 | |
| 916 | #[test] |
| 917 | fn test_parse_after_tool() { |
| 918 | let hook = make_hook(); |
| 919 | let input = br#"{"session_id": "sess-123", "tool_name": "read_file", "tool_response": {"content": "hello"}}"#; |
| 920 | let event = hook.parse_event(HookType::PostToolUse, input).unwrap(); |
| 921 | assert_eq!(event.session_id, "sess-123"); |
| 922 | assert_eq!(event.event_type, HookType::PostToolUse); |
| 923 | assert_eq!(event.tool_name.as_deref(), Some("read_file")); |
| 924 | } |
| 925 | |
| 926 | #[test] |
| 927 | fn test_parse_empty_input() { |
nothing calls this directly
no test coverage detected