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

Function test_parse_post_tool

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

Source from the content-addressed store, hash-verified

982
983 #[test]
984 fn test_parse_post_tool() {
985 let hook = make_hook();
986 let input = br#"{
987 "conversation_id": "c1",
988 "tool_name": "edit_file",
989 "tool_use_id": "tu-42",
990 "model": "claude-sonnet-4-6",
991 "duration": 1500
992 }"#;
993 let event = hook.parse_event(HookType::PostToolUse, input).unwrap();
994 assert_eq!(event.session_id, "c1");
995 assert_eq!(event.tool_name.as_deref(), Some("edit_file"));
996 assert_eq!(event.tool_use_id.as_deref(), Some("tu-42"));
997 }
998
999 #[test]
1000 fn test_parse_post_tool_with_output() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected