()
| 725 | |
| 726 | #[test] |
| 727 | fn test_parse_before_tool() { |
| 728 | let hook = make_hook(); |
| 729 | let input = br#"{ |
| 730 | "session_id": "s1", |
| 731 | "tool_name": "edit", |
| 732 | "tool_call_id": "call-42", |
| 733 | "tool_input": {"file": "main.rs"} |
| 734 | }"#; |
| 735 | let event = hook.parse_event(HookType::PreToolUse, input).unwrap(); |
| 736 | assert_eq!(event.session_id, "s1"); |
| 737 | assert_eq!(event.tool_name.as_deref(), Some("edit")); |
| 738 | assert_eq!(event.tool_use_id.as_deref(), Some("call-42")); |
| 739 | } |
| 740 | |
| 741 | #[test] |
| 742 | fn test_parse_before_tool_minimal() { |
nothing calls this directly
no test coverage detected