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

Function test_parse_post_tool_use

atomic-agent/src/hooks/claude_code/tests.rs:233–249  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

231
232 #[test]
233 fn test_parse_post_tool_use() {
234 let hook = make_hook();
235 let input = br#"{
236 "session_id": "sess-9",
237 "transcript_path": "/t.jsonl",
238 "tool_use_id": "tu-002",
239 "tool_name": "Task",
240 "tool_input": {"description": "implement feature"},
241 "tool_response": {"agentId": "agent-abc"}
242 }"#;
243 let event = hook.parse_event(HookType::PostToolUse, input).unwrap();
244
245 assert_eq!(event.session_id, "sess-9");
246 assert_eq!(event.event_type, HookType::PostToolUse);
247 assert_eq!(event.tool_use_id, Some("tu-002".to_string()));
248 assert_eq!(event.tool_name, Some("Task".to_string()));
249 }
250
251 #[test]
252 fn test_parse_post_tool_use_todo_write() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected