()
| 586 | |
| 587 | #[test] |
| 588 | fn test_parse_stop_session_end_fire() { |
| 589 | let hook = make_hook(); |
| 590 | let input = br#"{"sessionId": "s1", "reason": "channel_closed"}"#; |
| 591 | let event = hook.parse_event(HookType::TurnEnd, input).unwrap(); |
| 592 | let raw = event.raw_json.unwrap(); |
| 593 | assert_eq!( |
| 594 | raw.get("finish_reason").and_then(Value::as_str), |
| 595 | Some("session-end") |
| 596 | ); |
| 597 | } |
| 598 | |
| 599 | #[test] |
| 600 | fn test_parse_pre_tool_use() { |
nothing calls this directly
no test coverage detected