()
| 221 | |
| 222 | #[test] |
| 223 | fn parses_tool_payload_fields() { |
| 224 | let hook = HermesHook::new(); |
| 225 | let input = br#"{ |
| 226 | "hook_event_name": "pre_tool_call", |
| 227 | "session_id": "sess-456", |
| 228 | "tool_name": "terminal", |
| 229 | "tool_call_id": "call-1", |
| 230 | "tool_input": {"command": "cargo test"} |
| 231 | }"#; |
| 232 | |
| 233 | let event = hook.parse_event(HookType::PreToolUse, input).unwrap(); |
| 234 | assert_eq!(event.session_id, "sess-456"); |
| 235 | assert_eq!(event.tool_name.as_deref(), Some("terminal")); |
| 236 | assert_eq!(event.tool_use_id.as_deref(), Some("call-1")); |
| 237 | } |
| 238 | |
| 239 | #[test] |
| 240 | fn supports_hermes_hook_verbs() { |
nothing calls this directly
no test coverage detected