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

Function test_parse_session_end

atomic-agent/src/hooks/copilot.rs:617–623  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

615
616 #[test]
617 fn test_parse_session_end() {
618 let hook = make_hook();
619 let input = br#"{"session_id": "cp-abc123", "reason": "user_exit"}"#;
620 let event = hook.parse_event(HookType::SessionEnd, input).unwrap();
621 assert_eq!(event.session_id, "cp-abc123");
622 assert_eq!(event.event_type, HookType::SessionEnd);
623 }
624
625 #[test]
626 fn test_parse_session_end_with_reason() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected