(t *testing.T)
| 774 | } |
| 775 | |
| 776 | func Test_Observable_FlatMap_Error1(t *testing.T) { |
| 777 | defer goleak.VerifyNone(t) |
| 778 | ctx, cancel := context.WithCancel(context.Background()) |
| 779 | defer cancel() |
| 780 | obs := testObservable(ctx, 1, 2, 3).FlatMap(func(i Item) Observable { |
| 781 | if i.V == 2 { |
| 782 | return testObservable(ctx, errFoo) |
| 783 | } |
| 784 | return testObservable(ctx, i.V.(int)+1, i.V.(int)*10) |
| 785 | }) |
| 786 | Assert(ctx, t, obs, HasItems(2, 10), HasError(errFoo)) |
| 787 | } |
| 788 | |
| 789 | func Test_Observable_FlatMap_Error2(t *testing.T) { |
| 790 | defer goleak.VerifyNone(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…