MCPcopy
hub / github.com/uber-go/zap / TestTakeWithSkip

Function TestTakeWithSkip

internal/stacktrace/stack_test.go:44–54  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

42}
43
44func TestTakeWithSkip(t *testing.T) {
45 trace := Take(1)
46 lines := strings.Split(trace, "\n")
47 require.NotEmpty(t, lines, "Expected stacktrace to have at least one frame.")
48 assert.Contains(
49 t,
50 lines[0],
51 "testing.",
52 "Expected stacktrace to start with the test runner (skipping our own frame).",
53 )
54}
55
56func TestTakeWithSkipInnerFunc(t *testing.T) {
57 var trace string

Callers

nothing calls this directly

Calls 1

TakeFunction · 0.85

Tested by

no test coverage detected