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:608–621  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected