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

Function test_parse_after_tool

atomic-agent/src/hooks/pi.rs:752–764  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

750
751 #[test]
752 fn test_parse_after_tool() {
753 let hook = make_hook();
754 let input = br#"{
755 "session_id": "s1",
756 "tool_name": "bash",
757 "tool_call_id": "call-99",
758 "status": "completed",
759 "duration": 1234
760 }"#;
761 let event = hook.parse_event(HookType::PostToolUse, input).unwrap();
762 assert_eq!(event.session_id, "s1");
763 assert_eq!(event.tool_name.as_deref(), Some("bash"));
764 }
765
766 // Error handling tests
767

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected