()
| 231 | |
| 232 | #[test] |
| 233 | fn test_parse_post_tool_use() { |
| 234 | let hook = make_hook(); |
| 235 | let input = br#"{ |
| 236 | "session_id": "sess-9", |
| 237 | "transcript_path": "/t.jsonl", |
| 238 | "tool_use_id": "tu-002", |
| 239 | "tool_name": "Task", |
| 240 | "tool_input": {"description": "implement feature"}, |
| 241 | "tool_response": {"agentId": "agent-abc"} |
| 242 | }"#; |
| 243 | let event = hook.parse_event(HookType::PostToolUse, input).unwrap(); |
| 244 | |
| 245 | assert_eq!(event.session_id, "sess-9"); |
| 246 | assert_eq!(event.event_type, HookType::PostToolUse); |
| 247 | assert_eq!(event.tool_use_id, Some("tu-002".to_string())); |
| 248 | assert_eq!(event.tool_name, Some("Task".to_string())); |
| 249 | } |
| 250 | |
| 251 | #[test] |
| 252 | fn test_parse_post_tool_use_todo_write() { |
nothing calls this directly
no test coverage detected