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

Function test_parse_after_tool

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected