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