()
| 287 | |
| 288 | #[test] |
| 289 | fn test_map_pre_tool_use() { |
| 290 | let executor = make_test_executor(); |
| 291 | |
| 292 | let event = HookEvent::PreToolUse(PreToolUseEvent { |
| 293 | session_id: "session-123".to_string(), |
| 294 | tool: "Bash".to_string(), |
| 295 | args: serde_json::json!({"command": "ls"}), |
| 296 | working_directory: "/workspace".to_string(), |
| 297 | recent_tools: vec![], |
| 298 | }); |
| 299 | |
| 300 | let ahp_event = executor.map_event(&event).unwrap(); |
| 301 | assert_eq!(ahp_event.event_type, EventType::PreAction); |
| 302 | assert_eq!(ahp_event.session_id, "session-123"); |
| 303 | assert_eq!(ahp_event.depth, 0); |
| 304 | } |
| 305 | |
| 306 | #[test] |
| 307 | fn test_map_decision_allow() { |
nothing calls this directly
no test coverage detected