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

Function test_parse_after_tool

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

Source from the content-addressed store, hash-verified

949
950 #[test]
951 fn test_parse_after_tool() {
952 let hook = make_hook();
953 let input = br#"{"session_id": "sess-123", "tool_name": "read_file", "tool_response": {"content": "hello"}}"#;
954 let event = hook.parse_event(HookType::PostToolUse, input).unwrap();
955 assert_eq!(event.session_id, "sess-123");
956 assert_eq!(event.event_type, HookType::PostToolUse);
957 assert_eq!(event.tool_name.as_deref(), Some("read_file"));
958 }
959
960 #[test]
961 fn test_parse_empty_input() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected