()
| 1424 | |
| 1425 | #[test] |
| 1426 | fn test_parse_post_tool_use_error() { |
| 1427 | let hook = make_hook(); |
| 1428 | let input = br#"{"conversationId": "ec33ebf9", "stepIdx": 7, "error": "exit status 1"}"#; |
| 1429 | let event = hook.parse_event(HookType::PostToolUse, input).unwrap(); |
| 1430 | assert_eq!(event.tool_use_id.as_deref(), Some("7")); |
| 1431 | let raw = event.raw_json.unwrap(); |
| 1432 | assert_eq!(raw.get("status").and_then(Value::as_str), Some("error")); |
| 1433 | } |
| 1434 | |
| 1435 | #[test] |
| 1436 | fn test_parse_missing_conversation_id_defaults_unknown() { |
nothing calls this directly
no test coverage detected