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

Function TestSimpleWrapSimple

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

Source from the content-addressed store, hash-verified

70}
71
72func TestSimpleWrapSimple(t *testing.T) {
73 wrapped := errors.New("error 2")
74 err := fmt.Errorf("error 1: %w", wrapped)
75 checkUnredactedError(t, err, "error 1: error 2")
76 checkRedactedError(t, err, "<redacted *fmt.wrapError>: <redacted *errors.errorString>")
77 if !errors.Is(err, wrapped) {
78 t.Error("got errors.Is(err, wrapped) == false")
79 }
80}
81
82func TestRedactor(t *testing.T) {
83 err := &testRedactor{msg: "sensitive", redactedMsg: "safe"}

Callers

nothing calls this directly

Calls 4

checkUnredactedErrorFunction · 0.85
checkRedactedErrorFunction · 0.85
IsMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected