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

Function test_parse_post_tool_with_output

atomic-agent/src/hooks/cursor.rs:1000–1012  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

998
999 #[test]
1000 fn test_parse_post_tool_with_output() {
1001 let hook = make_hook();
1002 let input = br#"{
1003 "conversation_id": "c1",
1004 "tool_name": "bash",
1005 "tool_output": "Hello world\n",
1006 "duration": 200
1007 }"#;
1008 let event = hook.parse_event(HookType::PostToolUse, input).unwrap();
1009 let raw = event.raw_json.unwrap();
1010 assert_eq!(raw["tool_output"], "Hello world\n");
1011 assert_eq!(raw["duration"], 200);
1012 }
1013
1014 #[test]
1015 fn test_parse_post_tool_minimal() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected