()
| 570 | |
| 571 | #[test] |
| 572 | fn test_parse_prompt_submit() { |
| 573 | let hook = make_hook(); |
| 574 | let input = br#"{ |
| 575 | "session_id": "kiro-20260521-153000", |
| 576 | "cwd": "/path/to/project", |
| 577 | "model": "claude-sonnet-4-6", |
| 578 | "prompt": "Fix the bug", |
| 579 | "timestamp": "2026-05-21T15:30:00Z" |
| 580 | }"#; |
| 581 | let event = hook.parse_event(HookType::TurnStart, input).unwrap(); |
| 582 | assert_eq!(event.session_id, "kiro-20260521-153000"); |
| 583 | assert_eq!(event.event_type, HookType::TurnStart); |
| 584 | assert_eq!(event.prompt.as_deref(), Some("Fix the bug")); |
| 585 | let raw = event.raw_json.unwrap(); |
| 586 | assert_eq!(raw["model"], "claude-sonnet-4-6"); |
| 587 | } |
| 588 | |
| 589 | // --- parse_event: agent-stop (TurnEnd) --- |
| 590 |
nothing calls this directly
no test coverage detected