MCPcopy Create free account
hub / github.com/UiPath/uipathcli / TestLogErrorWritesToStandardError

Function TestLogErrorWritesToStandardError

log/debug_logger_test.go:9–18  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestLogErrorWritesToStandardError(t *testing.T) {
10 var output bytes.Buffer
11 logger := NewDebugLogger(&output)
12
13 logger.LogError("There was an error")
14
15 if output.String() != "There was an error" {
16 t.Errorf("Standard error should contain error message, but got: %v", output.String())
17 }
18}
19
20func TestLogRequestDisplaysRequestDetails(t *testing.T) {
21 var output bytes.Buffer

Callers

nothing calls this directly

Calls 3

LogErrorMethod · 0.95
NewDebugLoggerFunction · 0.85
StringMethod · 0.80

Tested by

no test coverage detected