@@ -29,6 +29,9 @@ func TryReceive[V any](ch <-chan V, timeout time.Duration) (V, bool, bool) {
2929// RequireValue returns the next value from the channel, or forces an immediate test failure 
3030// and exit if the timeout expires first. 
3131func  RequireValue [V  any ](t  require.TestingT , ch  <- chan  V , timeout  time.Duration , customMessageAndArgs  ... any ) V  {
32+ 	if  t , ok  :=  t .(interface { Helper () }); ok  {
33+ 		t .Helper ()
34+ 	}
3235	v , ok , closed  :=  TryReceive (ch , timeout )
3336	if  ok  {
3437		return  v 
@@ -53,6 +56,9 @@ func AssertNoMoreValues[V any](
5356	timeout  time.Duration ,
5457	customMessageAndArgs  ... any ,
5558) bool  {
59+ 	if  t , ok  :=  t .(interface { Helper () }); ok  {
60+ 		t .Helper ()
61+ 	}
5662	v , ok , closed  :=  TryReceive (ch , timeout )
5763	if  ok  {
5864		failWithMessageAndArgs (t , customMessageAndArgs ,
@@ -73,6 +79,9 @@ func AssertChannelClosed[V any](
7379	timeout  time.Duration ,
7480	customMessageAndArgs  ... any ,
7581) bool  {
82+ 	if  t , ok  :=  t .(interface { Helper () }); ok  {
83+ 		t .Helper ()
84+ 	}
7685	v , ok , closed  :=  TryReceive (ch , timeout )
7786	if  ok  {
7887		failWithMessageAndArgs (t , customMessageAndArgs ,
@@ -95,6 +104,9 @@ func AssertChannelNotClosed[V any](
95104	timeout  time.Duration ,
96105	customMessageAndArgs  ... any ,
97106) bool  {
107+ 	if  t , ok  :=  t .(interface { Helper () }); ok  {
108+ 		t .Helper ()
109+ 	}
98110	deadline  :=  time .NewTimer (timeout )
99111	defer  deadline .Stop ()
100112	for  {
0 commit comments