@@ -213,28 +213,6 @@ describe('map', () => {
213
213
} ) ;
214
214
} ) ;
215
215
216
- it ( 'should map using a custom thisArg' , ( ) => {
217
- testScheduler . run ( ( { hot, expectObservable, expectSubscriptions } ) => {
218
- const e1 = hot ( '-5-^-4--3---2----1--|' ) ;
219
- const e1subs = ' ^----------------!' ;
220
- const expected = ' --a--b---c----d--|' ;
221
- const values = { a : 46 , b : 55 , c : 64 , d : 73 } ;
222
-
223
- const foo = {
224
- value : 42 ,
225
- } ;
226
- const result = e1 . pipe (
227
- map ( function ( this : typeof foo , x : string , index : number ) {
228
- expect ( this ) . to . equal ( foo ) ;
229
- return parseInt ( x ) + foo . value + index * 10 ;
230
- } , foo )
231
- ) ;
232
-
233
- expectObservable ( result ) . toBe ( expected , values ) ;
234
- expectSubscriptions ( e1 . subscriptions ) . toBe ( e1subs ) ;
235
- } ) ;
236
- } ) ;
237
-
238
216
it ( 'should map twice' , ( ) => {
239
217
testScheduler . run ( ( { hot, expectObservable, expectSubscriptions } ) => {
240
218
const e1 = hot ( '-0----1-^-2---3--4-5--6--7-8-|' ) ;
@@ -266,36 +244,6 @@ describe('map', () => {
266
244
} ) ;
267
245
} ) ;
268
246
269
- it ( 'should do multiple maps using a custom thisArg' , ( ) => {
270
- testScheduler . run ( ( { hot, expectObservable, expectSubscriptions } ) => {
271
- const e1 = hot ( ' --1--2--3--4--|' ) ;
272
- const e1subs = ' ^-------------!' ;
273
- const expected = '--a--b--c--d--|' ;
274
- const values = { a : 11 , b : 14 , c : 17 , d : 20 } ;
275
-
276
- class Filterer {
277
- selector1 = ( x : string ) => parseInt ( x ) + 2 ;
278
- selector2 = ( x : string ) => parseInt ( x ) * 3 ;
279
- }
280
- const filterer = new Filterer ( ) ;
281
-
282
- const result = e1 . pipe (
283
- map ( function ( this : any , x ) {
284
- return this . selector1 ( x ) ;
285
- } , filterer ) ,
286
- map ( function ( this : any , x ) {
287
- return this . selector2 ( x ) ;
288
- } , filterer ) ,
289
- map ( function ( this : any , x ) {
290
- return this . selector1 ( x ) ;
291
- } , filterer )
292
- ) ;
293
-
294
- expectObservable ( result ) . toBe ( expected , values ) ;
295
- expectSubscriptions ( e1 . subscriptions ) . toBe ( e1subs ) ;
296
- } ) ;
297
- } ) ;
298
-
299
247
it ( 'should not break unsubscription chain when unsubscribed explicitly' , ( ) => {
300
248
testScheduler . run ( ( { cold, expectObservable, expectSubscriptions } ) => {
301
249
const e1 = cold ( ' --1--2--3--|' ) ;
0 commit comments