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

Source from the content-addressed store, hash-verified

577
578 #[test]
579 fn test_parse_pre_tool_use() {
580 let hook = make_hook();
581 let input = br#"{
582 "session_id": "abc123-kilo",
583 "tool_name": "write",
584 "cwd": "/tmp/project"
585 }"#;
586 let event = hook.parse_event(HookType::PreToolUse, input).unwrap();
587 assert_eq!(event.session_id, "abc123-kilo");
588 assert_eq!(event.event_type, HookType::PreToolUse);
589 assert_eq!(event.tool_name.as_deref(), Some("write"));
590 }
591
592 #[test]
593 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