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

Function test_parse_user_prompt

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

Source from the content-addressed store, hash-verified

628
629 #[test]
630 fn test_parse_user_prompt() {
631 let hook = make_hook();
632 let input = br#"{"session_id": "s1", "prompt": "Fix the auth bug in login.rs"}"#;
633 let event = hook.parse_event(HookType::TurnStart, input).unwrap();
634 assert_eq!(event.session_id, "s1");
635 assert_eq!(event.event_type, HookType::TurnStart);
636 assert_eq!(
637 event.prompt.as_deref(),
638 Some("Fix the auth bug in login.rs")
639 );
640 }
641
642 #[test]
643 fn test_parse_user_prompt_no_prompt() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected