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

Function test_parse_pre_tool_use

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

Source from the content-addressed store, hash-verified

580
581 #[test]
582 fn test_parse_pre_tool_use() {
583 let hook = make_hook();
584 let input = br#"{
585 "session_id": "abc123-kilo",
586 "tool_name": "write",
587 "cwd": "/tmp/project"
588 }"#;
589 let event = hook.parse_event(HookType::PreToolUse, input).unwrap();
590 assert_eq!(event.session_id, "abc123-kilo");
591 assert_eq!(event.event_type, HookType::PreToolUse);
592 assert_eq!(event.tool_name.as_deref(), Some("write"));
593 }
594
595 #[test]
596 fn test_parse_post_tool_use() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected