diff --git a/observable_operator_test.go b/observable_operator_test.go index fa9ac9cb..229d7a82 100644 --- a/observable_operator_test.go +++ b/observable_operator_test.go @@ -381,13 +381,14 @@ func Test_Observable_Count_Parallel(t *testing.T) { HasItem(int64(10000))) } -// FIXME -//func Test_Observable_Debounce(t *testing.T) { -// defer goleak.VerifyNone(t) -// ctx, obs, d := timeCausality(1, tick, 2, tick, 3, 4, 5, tick, 6, tick) -// Assert(ctx, t, obs.Debounce(d, WithBufferedChannel(10), WithContext(ctx)), -// HasItems(1, 2, 5, 6)) -//} +func Test_Observable_Debounce(t *testing.T) { + defer goleak.VerifyNone(t) + ctx, obs, d := timeCausality(1, tick, 2, tick, 3, 4, 5, tick, 6, tick) + ctx, cancel := context.WithCancel(ctx) + defer cancel() + Assert(ctx, t, obs.Debounce(d, WithBufferedChannel(10), WithContext(ctx)), + HasItems(1, 2, 5, 6)) +} func Test_Observable_Debounce_Error(t *testing.T) { defer goleak.VerifyNone(t)