MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_parse_pre_tool_use

Function test_parse_pre_tool_use

atomic-agent/src/hooks/kiro.rs:611–624  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

609
610 #[test]
611 fn test_parse_pre_tool_use() {
612 let hook = make_hook();
613 let input = br#"{
614 "session_id": "kiro-20260521-153000",
615 "tool_name": "write",
616 "tool_call_id": "tc_123",
617 "cwd": "/path/to/project"
618 }"#;
619 let event = hook.parse_event(HookType::PreToolUse, input).unwrap();
620 assert_eq!(event.session_id, "kiro-20260521-153000");
621 assert_eq!(event.event_type, HookType::PreToolUse);
622 assert_eq!(event.tool_name.as_deref(), Some("write"));
623 assert_eq!(event.tool_use_id.as_deref(), Some("tc_123"));
624 }
625
626 // --- parse_event: post-tool-use (PostToolUse) ---
627

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected