(t *testing.T)
| 91 | } |
| 92 | |
| 93 | func TestParseLineCodex_turnFailed(t *testing.T) { |
| 94 | line := `{"type":"turn.failed","error":{"message":"model response stream ended unexpectedly"}}` |
| 95 | ev := ParseLineCodex(line) |
| 96 | if ev == nil { |
| 97 | t.Fatal("expected event, got nil") |
| 98 | } |
| 99 | if ev.Type != EventError { |
| 100 | t.Errorf("expected EventError, got %v", ev.Type) |
| 101 | } |
| 102 | if ev.Err == nil { |
| 103 | t.Fatal("expected Err set") |
| 104 | } |
| 105 | if ev.Err.Error() != "model response stream ended unexpectedly" { |
| 106 | t.Errorf("unexpected Err: %v", ev.Err) |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | func TestParseLineCodex_error(t *testing.T) { |
| 111 | line := `{"type":"error","message":"stream error: broken pipe"}` |
nothing calls this directly
no test coverage detected