()
| 829 | |
| 830 | #[test] |
| 831 | fn test_turn_event_builder_chain() { |
| 832 | let event = TurnEvent::new("sess-1", HookType::TurnStart) |
| 833 | .with_prompt("Fix the bug") |
| 834 | .with_transcript_path("/tmp/transcript.jsonl") |
| 835 | .with_tool_name("Edit") |
| 836 | .with_tool_use_id("tu-123") |
| 837 | .with_raw_json(serde_json::json!({"session_id": "sess-1"})); |
| 838 | |
| 839 | assert_eq!(event.prompt.as_deref(), Some("Fix the bug")); |
| 840 | assert_eq!( |
| 841 | event.transcript_path.as_deref(), |
| 842 | Some(std::path::Path::new("/tmp/transcript.jsonl")) |
| 843 | ); |
| 844 | assert_eq!(event.tool_name.as_deref(), Some("Edit")); |
| 845 | assert_eq!(event.tool_use_id.as_deref(), Some("tu-123")); |
| 846 | assert!(event.raw_json.is_some()); |
| 847 | } |
| 848 | |
| 849 | #[test] |
| 850 | fn test_turn_event_has_prompt() { |
nothing calls this directly
no test coverage detected