(t *testing.T)
| 100 | } |
| 101 | |
| 102 | func 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 | |
| 113 | func TestErrorCollectorError_MultipleErrors(t *testing.T) { |
| 114 | collector := NewErrorCollector(false) |
nothing calls this directly
no test coverage detected