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

Function test_parse_task_cancel

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

Source from the content-addressed store, hash-verified

699
700 #[test]
701 fn test_parse_task_cancel() {
702 let hook = make_hook();
703 let input = br#"{
704 "taskId": "cancel-111",
705 "hookName": "TaskCancel",
706 "taskCancel": {"task": "Cancelled by user"}
707 }"#;
708 let event = hook.parse_event(HookType::SessionEnd, input).unwrap();
709 assert_eq!(event.session_id, "cancel-111");
710 assert_eq!(event.event_type, HookType::SessionEnd);
711 assert_eq!(event.prompt.as_deref(), Some("Cancelled by user"));
712 }
713
714 #[test]
715 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