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

Source from the content-addressed store, hash-verified

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