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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected