1
1
import { expect } from 'chai' ;
2
2
import { TestScheduler } from 'rxjs/testing' ;
3
- import { onErrorResumeNext , take , finalize , tap } from 'rxjs/operators' ;
3
+ import { onErrorResumeNextWith , take , finalize , tap } from 'rxjs/operators' ;
4
4
import { concat , throwError , of , Observable } from 'rxjs' ;
5
5
import { asInteropObservable } from '../helpers/interop-helper' ;
6
6
import { observableMatcher } from '../helpers/observableMatcher' ;
7
7
8
- describe ( 'onErrorResumeNext ' , ( ) => {
8
+ describe ( 'onErrorResumeNextWith ' , ( ) => {
9
9
let testScheduler : TestScheduler ;
10
10
11
11
beforeEach ( ( ) => {
@@ -20,7 +20,7 @@ describe('onErrorResumeNext', () => {
20
20
const e2subs = ' --------^-------!' ;
21
21
const expected = '--a--b----c--d--|' ;
22
22
23
- expectObservable ( e1 . pipe ( onErrorResumeNext ( e2 ) ) ) . toBe ( expected ) ;
23
+ expectObservable ( e1 . pipe ( onErrorResumeNextWith ( e2 ) ) ) . toBe ( expected ) ;
24
24
expectSubscriptions ( e1 . subscriptions ) . toBe ( e1subs ) ;
25
25
expectSubscriptions ( e2 . subscriptions ) . toBe ( e2subs ) ;
26
26
} ) ;
@@ -34,7 +34,7 @@ describe('onErrorResumeNext', () => {
34
34
const e2subs = ' --------^-------!' ;
35
35
const expected = '--a--b----c--d--|' ;
36
36
37
- expectObservable ( e1 . pipe ( onErrorResumeNext ( e2 ) ) ) . toBe ( expected ) ;
37
+ expectObservable ( e1 . pipe ( onErrorResumeNextWith ( e2 ) ) ) . toBe ( expected ) ;
38
38
expectSubscriptions ( e1 . subscriptions ) . toBe ( e1subs ) ;
39
39
expectSubscriptions ( e2 . subscriptions ) . toBe ( e2subs ) ;
40
40
} ) ;
@@ -56,7 +56,7 @@ describe('onErrorResumeNext', () => {
56
56
] ;
57
57
const expected = '--a--b----c--d----e----f--g--|' ;
58
58
59
- expectObservable ( e1 . pipe ( onErrorResumeNext ( e2 ) ) ) . toBe ( expected ) ;
59
+ expectObservable ( e1 . pipe ( onErrorResumeNextWith ( e2 ) ) ) . toBe ( expected ) ;
60
60
expectSubscriptions ( e1 . subscriptions ) . toBe ( e1subs ) ;
61
61
expectSubscriptions ( e2 [ 0 ] . subscriptions ) . toBe ( e2subs [ 0 ] ) ;
62
62
expectSubscriptions ( e2 [ 1 ] . subscriptions ) . toBe ( e2subs [ 1 ] ) ;
@@ -76,7 +76,7 @@ describe('onErrorResumeNext', () => {
76
76
const e4subs = ' ---------------------^-------!' ;
77
77
const expected = '--a--b----c--d----e----f--g--|' ;
78
78
79
- expectObservable ( e1 . pipe ( onErrorResumeNext ( e2 , e3 , e4 ) ) ) . toBe ( expected ) ;
79
+ expectObservable ( e1 . pipe ( onErrorResumeNextWith ( e2 , e3 , e4 ) ) ) . toBe ( expected ) ;
80
80
expectSubscriptions ( e1 . subscriptions ) . toBe ( e1subs ) ;
81
81
expectSubscriptions ( e2 . subscriptions ) . toBe ( e2subs ) ;
82
82
expectSubscriptions ( e3 . subscriptions ) . toBe ( e3subs ) ;
@@ -96,7 +96,7 @@ describe('onErrorResumeNext', () => {
96
96
const e4subs = ' ---------------------^-------!' ;
97
97
const expected = '--a--b----c--d----e----f--g--|' ;
98
98
99
- expectObservable ( e1 . pipe ( onErrorResumeNext ( e2 , e3 , e4 ) ) ) . toBe ( expected ) ;
99
+ expectObservable ( e1 . pipe ( onErrorResumeNextWith ( e2 , e3 , e4 ) ) ) . toBe ( expected ) ;
100
100
expectSubscriptions ( e1 . subscriptions ) . toBe ( e1subs ) ;
101
101
expectSubscriptions ( e2 . subscriptions ) . toBe ( e2subs ) ;
102
102
expectSubscriptions ( e3 . subscriptions ) . toBe ( e3subs ) ;
@@ -116,7 +116,7 @@ describe('onErrorResumeNext', () => {
116
116
const e4subs = ' -------------^-------!' ;
117
117
const expected = '--c--d----e----f--g--|' ;
118
118
119
- expectObservable ( e1 . pipe ( onErrorResumeNext ( e2 , e3 , e4 ) ) ) . toBe ( expected ) ;
119
+ expectObservable ( e1 . pipe ( onErrorResumeNextWith ( e2 , e3 , e4 ) ) ) . toBe ( expected ) ;
120
120
expectSubscriptions ( e1 . subscriptions ) . toBe ( e1subs ) ;
121
121
expectSubscriptions ( e2 . subscriptions ) . toBe ( e2subs ) ;
122
122
expectSubscriptions ( e3 . subscriptions ) . toBe ( e3subs ) ;
@@ -132,7 +132,7 @@ describe('onErrorResumeNext', () => {
132
132
const e2subs = ' --------^-' ;
133
133
const expected = '--a--b----' ;
134
134
135
- expectObservable ( e1 . pipe ( onErrorResumeNext ( e2 ) ) ) . toBe ( expected ) ;
135
+ expectObservable ( e1 . pipe ( onErrorResumeNextWith ( e2 ) ) ) . toBe ( expected ) ;
136
136
expectSubscriptions ( e1 . subscriptions ) . toBe ( e1subs ) ;
137
137
expectSubscriptions ( e2 . subscriptions ) . toBe ( e2subs ) ;
138
138
} ) ;
@@ -146,7 +146,7 @@ describe('onErrorResumeNext', () => {
146
146
const e2subs : string [ ] = [ ] ;
147
147
const expected = '--a--' ;
148
148
149
- expectObservable ( e1 . pipe ( onErrorResumeNext ( e2 ) ) ) . toBe ( expected ) ;
149
+ expectObservable ( e1 . pipe ( onErrorResumeNextWith ( e2 ) ) ) . toBe ( expected ) ;
150
150
expectSubscriptions ( e1 . subscriptions ) . toBe ( e1subs ) ;
151
151
expectSubscriptions ( e2 . subscriptions ) . toBe ( e2subs ) ;
152
152
} ) ;
@@ -160,7 +160,7 @@ describe('onErrorResumeNext', () => {
160
160
const e2subs = ' --------^-------!' ;
161
161
const expected = '--a--b----c--d--|' ;
162
162
163
- expectObservable ( e1 . pipe ( onErrorResumeNext ( e2 ) ) ) . toBe ( expected ) ;
163
+ expectObservable ( e1 . pipe ( onErrorResumeNextWith ( e2 ) ) ) . toBe ( expected ) ;
164
164
expectSubscriptions ( e1 . subscriptions ) . toBe ( e1subs ) ;
165
165
expectSubscriptions ( e2 . subscriptions ) . toBe ( e2subs ) ;
166
166
} ) ;
@@ -178,7 +178,7 @@ describe('onErrorResumeNext', () => {
178
178
} ) ;
179
179
180
180
throwError ( ( ) => new Error ( 'Some error' ) )
181
- . pipe ( onErrorResumeNext ( synchronousObservable ) , take ( 3 ) )
181
+ . pipe ( onErrorResumeNextWith ( synchronousObservable ) , take ( 3 ) )
182
182
. subscribe ( ( ) => {
183
183
/* noop */
184
184
} ) ;
@@ -201,7 +201,7 @@ describe('onErrorResumeNext', () => {
201
201
// test ensures that unsubscriptions are chained all the way to the
202
202
// interop subscriber.
203
203
204
- expectObservable ( e1 . pipe ( onErrorResumeNext ( asInteropObservable ( e2 ) ) ) , unsub ) . toBe ( expected ) ;
204
+ expectObservable ( e1 . pipe ( onErrorResumeNextWith ( asInteropObservable ( e2 ) ) ) , unsub ) . toBe ( expected ) ;
205
205
expectSubscriptions ( e1 . subscriptions ) . toBe ( e1subs ) ;
206
206
expectSubscriptions ( e2 . subscriptions ) . toBe ( e2subs ) ;
207
207
} ) ;
@@ -214,7 +214,7 @@ describe('onErrorResumeNext', () => {
214
214
throwError ( ( ) => 'meh' )
215
215
) ;
216
216
217
- source . pipe ( onErrorResumeNext ( Promise . resolve ( 2 ) ) ) . subscribe ( {
217
+ source . pipe ( onErrorResumeNextWith ( Promise . resolve ( 2 ) ) ) . subscribe ( {
218
218
next : ( x ) => {
219
219
expect ( expected . shift ( ) ) . to . equal ( x ) ;
220
220
} ,
@@ -232,7 +232,7 @@ describe('onErrorResumeNext', () => {
232
232
const results : any [ ] = [ ] ;
233
233
234
234
of ( 1 )
235
- . pipe ( onErrorResumeNext ( [ 2 , 3 , 4 ] , { notValid : 'LOL' } as any , of ( 5 , 6 ) ) )
235
+ . pipe ( onErrorResumeNextWith ( [ 2 , 3 , 4 ] , { notValid : 'LOL' } as any , of ( 5 , 6 ) ) )
236
236
. subscribe ( {
237
237
next : ( value ) => results . push ( value ) ,
238
238
complete : ( ) => results . push ( 'complete' ) ,
@@ -247,7 +247,7 @@ describe('onErrorResumeNext', () => {
247
247
of ( 1 )
248
248
. pipe (
249
249
finalize ( ( ) => results . push ( 'finalize 1' ) ) ,
250
- onErrorResumeNext (
250
+ onErrorResumeNextWith (
251
251
of ( 2 ) . pipe ( finalize ( ( ) => results . push ( 'finalize 2' ) ) ) ,
252
252
of ( 3 ) . pipe ( finalize ( ( ) => results . push ( 'finalize 3' ) ) ) ,
253
253
of ( 4 ) . pipe ( finalize ( ( ) => results . push ( 'finalize 4' ) ) )
@@ -270,7 +270,7 @@ describe('onErrorResumeNext', () => {
270
270
subscribe : ( ) => results . push ( 'subscribe 1' ) ,
271
271
finalize : ( ) => results . push ( 'finalize 1' ) ,
272
272
} ) ,
273
- onErrorResumeNext (
273
+ onErrorResumeNextWith (
274
274
of ( 2 ) . pipe (
275
275
tap ( {
276
276
subscribe : ( ) => results . push ( 'subscribe 2' ) ,
0 commit comments