Add test for WaitForError panic

This commit is contained in:
Dan Jones 2025-11-13 15:23:18 -06:00
commit addd0d5e7b
2 changed files with 12 additions and 1 deletions

View file

@ -92,3 +92,14 @@ func TestUnwrap(tt *testing.T) {
be.Equal(t, weNoErr.Unwrap(), nil)
})
}
func TestWaitForErrorPanic(t *testing.T) {
defer func() {
if r := recover(); r == nil {
t.Errorf("The code did not panic")
}
}()
we := new(waiterr.WaitErr)
_ = we.WaitForError()
}