()
| 643 | |
| 644 | #[test] |
| 645 | fn test_parse_stop_session_end_fire() { |
| 646 | let hook = make_hook(); |
| 647 | let input = br#"{"sessionId": "s1", "reason": "channel_closed"}"#; |
| 648 | let event = hook.parse_event(HookType::TurnEnd, input).unwrap(); |
| 649 | let raw = event.raw_json.unwrap(); |
| 650 | assert_eq!( |
| 651 | raw.get("finish_reason").and_then(Value::as_str), |
| 652 | Some("session-end") |
| 653 | ); |
| 654 | } |
| 655 | |
| 656 | #[test] |
| 657 | fn test_parse_pre_tool_use() { |
nothing calls this directly
no test coverage detected