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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected