MCPcopy Index your code
hub / github.com/riverqueue/river / PanicTB

Function PanicTB

rivershared/util/testutil/test_util.go:22–24  ·  view source on GitHub ↗

PanicTB is an implementation for testing.TB that panics when an error is logged or FailNow is called. This is useful to inject into test helpers in example tests where no *testing.T is available. If env is set with `RIVER_DEBUG=true`, output is logged to os.Stderr (Stderr instead of Stdout to not i

()

Source from the content-addressed store, hash-verified

20// Doesn't fully implement testing.TB. Functions where it's used should take the
21// more streamlined TestingTB instead.
22func PanicTB() *panicTB {
23 return &panicTB{}
24}
25
26func (tb *panicTB) Errorf(format string, args ...any) {
27 panic(fmt.Sprintf(format, args...))

Callers 15

Example_uniqueJobFunction · 0.92
Example_jobArgsHooksFunction · 0.92
Example_jobSnoozeFunction · 0.92
initTestConfigFunction · 0.92
Example_insertAndWorkFunction · 0.92
Example_periodicJobFunction · 0.92
Example_cronJobFunction · 0.92
Example_batchInsertFunction · 0.92
Example_resumableCursorFunction · 0.92

Calls

no outgoing calls

Tested by 15

Example_uniqueJobFunction · 0.74
Example_jobArgsHooksFunction · 0.74
Example_jobSnoozeFunction · 0.74
initTestConfigFunction · 0.74
Example_insertAndWorkFunction · 0.74
Example_periodicJobFunction · 0.74
Example_cronJobFunction · 0.74
Example_batchInsertFunction · 0.74
Example_resumableCursorFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…