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

Function test_parse_post_tool_use

atomic-agent/src/hooks/kilo.rs:593–606  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

591
592 #[test]
593 fn test_parse_post_tool_use() {
594 let hook = make_hook();
595 let input = br#"{
596 "session_id": "abc123-kilo",
597 "tool_name": "bash",
598 "tool_call_id": "call-42",
599 "cwd": "/tmp/project"
600 }"#;
601 let event = hook.parse_event(HookType::PostToolUse, input).unwrap();
602 assert_eq!(event.session_id, "abc123-kilo");
603 assert_eq!(event.event_type, HookType::PostToolUse);
604 assert_eq!(event.tool_name.as_deref(), Some("bash"));
605 assert_eq!(event.tool_use_id.as_deref(), Some("call-42"));
606 }
607
608 // -- Detection tests --
609

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected