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

Function test_parse_task_cancel

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

Source from the content-addressed store, hash-verified

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