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

Function test_parse_session_start

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

Source from the content-addressed store, hash-verified

857
858 #[test]
859 fn test_parse_session_start() {
860 let hook = make_hook();
861 let input = br#"{"conversation_id": "conv-123", "session_id": "sess-456"}"#;
862 let event = hook.parse_event(HookType::SessionStart, input).unwrap();
863 // conversation_id is preferred
864 assert_eq!(event.session_id, "conv-123");
865 assert_eq!(event.event_type, HookType::SessionStart);
866 }
867
868 #[test]
869 fn test_parse_session_start_falls_back_to_session_id() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected