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

Function test_parse_before_tool

atomic-agent/src/hooks/gemini_cli.rs:941–948  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

939
940 #[test]
941 fn test_parse_before_tool() {
942 let hook = make_hook();
943 let input = br#"{"session_id": "sess-123", "tool_name": "write_file", "tool_input": {"path": "test.txt"}}"#;
944 let event = hook.parse_event(HookType::PreToolUse, input).unwrap();
945 assert_eq!(event.session_id, "sess-123");
946 assert_eq!(event.event_type, HookType::PreToolUse);
947 assert_eq!(event.tool_name.as_deref(), Some("write_file"));
948 }
949
950 #[test]
951 fn test_parse_after_tool() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected