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

Function test_parse_session_start

atomic-agent/src/hooks/claude_code/tests.rs:104–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102
103 #[test]
104 fn test_parse_session_start() {
105 let hook = make_hook();
106 let input = br#"{"session_id": "sess-1", "transcript_path": "/tmp/t.jsonl"}"#;
107 let event = hook.parse_event(HookType::SessionStart, input).unwrap();
108
109 assert_eq!(event.session_id, "sess-1");
110 assert_eq!(event.event_type, HookType::SessionStart);
111 assert_eq!(event.transcript_path, Some(PathBuf::from("/tmp/t.jsonl")));
112 assert!(event.prompt.is_none());
113 assert!(event.raw_json.is_some());
114 }
115
116 #[test]
117 fn test_parse_session_end() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected