MCPcopy Index your code
hub / github.com/jetify-com/devbox / TestErrorfWrapErrorf

Function TestErrorfWrapErrorf

internal/redact/redact_test.go:147–152  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

145}
146
147func TestErrorfWrapErrorf(t *testing.T) {
148 wrapped := Errorf("wrapped string = %s, wrapped safe string = %s", "sensitive", Safe("safe"))
149 err := Errorf("error: %w", wrapped)
150 checkUnredactedError(t, err, "error: wrapped string = sensitive, wrapped safe string = safe")
151 checkRedactedError(t, err, "error: wrapped string = <redacted string>, wrapped safe string = safe")
152}
153
154func TestErrorfAs(t *testing.T) {
155 wrapped := &customError{

Callers

nothing calls this directly

Calls 4

ErrorfFunction · 0.85
SafeFunction · 0.85
checkUnredactedErrorFunction · 0.85
checkRedactedErrorFunction · 0.85

Tested by

no test coverage detected