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

Function test_parse_task_cancel

atomic-agent/src/hooks/cline.rs:709–720  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

707
708 #[test]
709 fn test_parse_task_cancel() {
710 let hook = make_hook();
711 let input = br#"{
712 "taskId": "cancel-111",
713 "hookName": "TaskCancel",
714 "taskCancel": {"task": "Cancelled by user"}
715 }"#;
716 let event = hook.parse_event(HookType::SessionEnd, input).unwrap();
717 assert_eq!(event.session_id, "cancel-111");
718 assert_eq!(event.event_type, HookType::SessionEnd);
719 assert_eq!(event.prompt.as_deref(), Some("Cancelled by user"));
720 }
721
722 #[test]
723 fn test_parse_task_cancel_no_nested_data() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected