()
| 561 | |
| 562 | #[test] |
| 563 | fn test_parse_post_tool_use_error() { |
| 564 | let hook = make_hook(); |
| 565 | let input = br#"{"conversationId": "ec33ebf9", "stepIdx": 7, "error": "exit status 1"}"#; |
| 566 | let event = hook.parse_event(HookType::PostToolUse, input).unwrap(); |
| 567 | assert_eq!(event.tool_use_id.as_deref(), Some("7")); |
| 568 | let raw = event.raw_json.unwrap(); |
| 569 | assert_eq!(raw.get("status").and_then(Value::as_str), Some("error")); |
| 570 | } |
| 571 | |
| 572 | #[test] |
| 573 | fn test_parse_missing_conversation_id_defaults_unknown() { |
nothing calls this directly
no test coverage detected