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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected