MCPcopy Create free account
hub / github.com/github/gh-aw / TestErrorCollectorError_SingleError

Function TestErrorCollectorError_SingleError

pkg/workflow/error_aggregation_test.go:102–111  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

100}
101
102func TestErrorCollectorError_SingleError(t *testing.T) {
103 collector := NewErrorCollector(false)
104 err1 := errors.New("single error")
105
106 _ = collector.Add(err1)
107 result := collector.Error()
108
109 require.Error(t, result, "Should return error")
110 assert.Equal(t, err1, result, "Should return the single error as-is")
111}
112
113func TestErrorCollectorError_MultipleErrors(t *testing.T) {
114 collector := NewErrorCollector(false)

Callers

nothing calls this directly

Calls 4

AddMethod · 0.95
ErrorMethod · 0.95
NewErrorCollectorFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected