()
| 536 | |
| 537 | #[test] |
| 538 | fn test_parse_event_invalid_json() { |
| 539 | let hook = make_hook(); |
| 540 | let result = hook.parse_event(HookType::TurnStart, b"not json"); |
| 541 | assert!(result.is_err()); |
| 542 | assert!(matches!( |
| 543 | result.unwrap_err(), |
| 544 | AgentError::HookParseFailed { .. } |
| 545 | )); |
| 546 | } |
| 547 | |
| 548 | // --- parse_event: missing session_id generates fallback --- |
| 549 |
nothing calls this directly
no test coverage detected