MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / TestParseLineCodex_error

Function TestParseLineCodex_error

internal/loop/codex_parser_test.go:110–119  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

108}
109
110func TestParseLineCodex_error(t *testing.T) {
111 line := `{"type":"error","message":"stream error: broken pipe"}`
112 ev := ParseLineCodex(line)
113 if ev == nil {
114 t.Fatal("expected event, got nil")
115 }
116 if ev.Type != EventError {
117 t.Errorf("expected EventError, got %v", ev.Type)
118 }
119}
120
121func TestParseLineCodex_turnCompleted_ignored(t *testing.T) {
122 line := `{"type":"turn.completed","usage":{"input_tokens":24763,"cached_input_tokens":24448,"output_tokens":122}}`

Callers

nothing calls this directly

Calls 1

ParseLineCodexFunction · 0.85

Tested by

no test coverage detected