()
| 732 | |
| 733 | #[test] |
| 734 | fn test_parse_user_prompt() { |
| 735 | let hook = make_hook(); |
| 736 | let input = br#"{ |
| 737 | "taskId": "prompt-1", |
| 738 | "hookName": "UserPromptSubmit", |
| 739 | "userPromptSubmit": {"prompt": "Fix the auth bug in login.rs"} |
| 740 | }"#; |
| 741 | let event = hook.parse_event(HookType::TurnStart, input).unwrap(); |
| 742 | assert_eq!(event.session_id, "prompt-1"); |
| 743 | assert_eq!(event.event_type, HookType::TurnStart); |
| 744 | assert_eq!( |
| 745 | event.prompt.as_deref(), |
| 746 | Some("Fix the auth bug in login.rs") |
| 747 | ); |
| 748 | } |
| 749 | |
| 750 | #[test] |
| 751 | fn test_parse_user_prompt_snake_case_alias() { |
nothing calls this directly
no test coverage detected