()
| 948 | |
| 949 | #[test] |
| 950 | fn test_parse_after_tool() { |
| 951 | let hook = make_hook(); |
| 952 | let input = br#"{"session_id": "sess-123", "tool_name": "read_file", "tool_response": {"content": "hello"}}"#; |
| 953 | let event = hook.parse_event(HookType::PostToolUse, input).unwrap(); |
| 954 | assert_eq!(event.session_id, "sess-123"); |
| 955 | assert_eq!(event.event_type, HookType::PostToolUse); |
| 956 | assert_eq!(event.tool_name.as_deref(), Some("read_file")); |
| 957 | } |
| 958 | |
| 959 | #[test] |
| 960 | fn test_parse_empty_input() { |
nothing calls this directly
no test coverage detected