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