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

Source from the content-addressed store, hash-verified

905
906 #[test]
907 fn test_parse_before_tool() {
908 let hook = make_hook();
909 let input = br#"{"session_id": "sess-123", "tool_name": "write_file", "tool_input": {"path": "test.txt"}}"#;
910 let event = hook.parse_event(HookType::PreToolUse, input).unwrap();
911 assert_eq!(event.session_id, "sess-123");
912 assert_eq!(event.event_type, HookType::PreToolUse);
913 assert_eq!(event.tool_name.as_deref(), Some("write_file"));
914 }
915
916 #[test]
917 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