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

Function test_parse_session_end_with_reason

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

Source from the content-addressed store, hash-verified

622
623 #[test]
624 fn test_parse_session_end_with_reason() {
625 let hook = make_hook();
626 let input = br#"{"session_id": "s1", "reason": "timeout"}"#;
627 let event = hook.parse_event(HookType::SessionEnd, input).unwrap();
628 let raw = event.raw_json.unwrap();
629 assert_eq!(raw["reason"], "timeout");
630 }
631
632 // ── parse_event tests: user-prompt (TurnStart) ──────────────────
633

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected