@@ -5,15 +5,15 @@ var Promise = require('promise');
5
5
var Observable = Rx . Observable ;
6
6
var queueScheduler = Rx . Scheduler . queue ;
7
7
8
- describe ( 'Observable.prototype.switchMapFirst ()' , function ( ) {
8
+ describe ( 'Observable.prototype.switchFirstMap ()' , function ( ) {
9
9
it ( 'should handle outer throw' , function ( ) {
10
10
var x = cold ( '--a--b--c--|' ) ;
11
11
var xsubs = [ ] ;
12
12
var e1 = cold ( '#' ) ;
13
13
var e1subs = '(^!)' ;
14
14
var expected = '#' ;
15
15
16
- var result = e1 . switchMapFirst ( function ( ) { return x ; } ) ;
16
+ var result = e1 . switchFirstMap ( function ( ) { return x ; } ) ;
17
17
18
18
expectObservable ( result ) . toBe ( expected ) ;
19
19
expectSubscriptions ( x . subscriptions ) . toBe ( xsubs ) ;
@@ -27,7 +27,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
27
27
var e1subs = '(^!)' ;
28
28
var expected = '|' ;
29
29
30
- var result = e1 . switchMapFirst ( function ( ) { return x ; } ) ;
30
+ var result = e1 . switchFirstMap ( function ( ) { return x ; } ) ;
31
31
expectObservable ( result ) . toBe ( expected ) ;
32
32
expectSubscriptions ( x . subscriptions ) . toBe ( xsubs ) ;
33
33
expectSubscriptions ( e1 . subscriptions ) . toBe ( e1subs ) ;
@@ -40,7 +40,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
40
40
var e1subs = '^' ;
41
41
var expected = '-' ;
42
42
43
- var result = e1 . switchMapFirst ( function ( ) { return x ; } ) ;
43
+ var result = e1 . switchFirstMap ( function ( ) { return x ; } ) ;
44
44
45
45
expectObservable ( result ) . toBe ( expected ) ;
46
46
expectSubscriptions ( x . subscriptions ) . toBe ( xsubs ) ;
@@ -52,7 +52,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
52
52
var e1subs = '^ !' ;
53
53
var expected = '---#' ;
54
54
55
- var result = e1 . switchMapFirst ( function ( value ) {
55
+ var result = e1 . switchFirstMap ( function ( value ) {
56
56
throw 'error' ;
57
57
} ) ;
58
58
@@ -67,7 +67,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
67
67
var e1subs = '^ ! ' ;
68
68
var expected = '-----# ' ;
69
69
70
- var result = e1 . switchMapFirst ( function ( value ) {
70
+ var result = e1 . switchFirstMap ( function ( value ) {
71
71
return x ;
72
72
} , function ( ) {
73
73
throw 'error' ;
@@ -91,7 +91,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
91
91
92
92
var observableLookup = { x : x , y : y , z : z } ;
93
93
94
- var result = e1 . switchMapFirst ( function ( value ) {
94
+ var result = e1 . switchFirstMap ( function ( value ) {
95
95
return observableLookup [ value ] ;
96
96
} ) ;
97
97
@@ -116,7 +116,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
116
116
117
117
var observableLookup = { x : x , y : y , z : z } ;
118
118
119
- var result = e1 . switchMapFirst ( function ( value ) {
119
+ var result = e1 . switchFirstMap ( function ( value ) {
120
120
return observableLookup [ value ] ;
121
121
} ) ;
122
122
@@ -140,7 +140,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
140
140
141
141
var observableLookup = { x : x , y : y , z : z } ;
142
142
143
- var result = e1 . switchMapFirst ( function ( value ) {
143
+ var result = e1 . switchFirstMap ( function ( value ) {
144
144
return observableLookup [ value ] ;
145
145
} ) ;
146
146
@@ -162,7 +162,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
162
162
163
163
var observableLookup = { x : x , y : y } ;
164
164
165
- var result = e1 . switchMapFirst ( function ( value ) {
165
+ var result = e1 . switchFirstMap ( function ( value ) {
166
166
return observableLookup [ value ] ;
167
167
} ) ;
168
168
@@ -183,7 +183,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
183
183
184
184
var observableLookup = { x : x , y : y } ;
185
185
186
- var result = e1 . switchMapFirst ( function ( value ) {
186
+ var result = e1 . switchFirstMap ( function ( value ) {
187
187
return observableLookup [ value ] ;
188
188
} ) ;
189
189
@@ -206,7 +206,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
206
206
207
207
var observableLookup = { x : x , y : y , z : z } ;
208
208
209
- var result = e1 . switchMapFirst ( function ( value ) {
209
+ var result = e1 . switchFirstMap ( function ( value ) {
210
210
return observableLookup [ value ] ;
211
211
} ) ;
212
212
@@ -228,7 +228,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
228
228
229
229
var observableLookup = { x : x , y : y } ;
230
230
231
- var result = e1 . switchMapFirst ( function ( value ) {
231
+ var result = e1 . switchFirstMap ( function ( value ) {
232
232
return observableLookup [ value ] ;
233
233
} ) ;
234
234
@@ -249,7 +249,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
249
249
250
250
var observableLookup = { x : x , y : y } ;
251
251
252
- var result = e1 . switchMapFirst ( function ( value ) {
252
+ var result = e1 . switchFirstMap ( function ( value ) {
253
253
return observableLookup [ value ] ;
254
254
} ) ;
255
255
@@ -270,7 +270,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
270
270
271
271
var observableLookup = { x : x , y : y } ;
272
272
273
- var result = e1 . switchMapFirst ( function ( value ) {
273
+ var result = e1 . switchFirstMap ( function ( value ) {
274
274
return observableLookup [ value ] ;
275
275
} ) ;
276
276
@@ -291,7 +291,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
291
291
292
292
var observableLookup = { x : x , y : y } ;
293
293
294
- var result = e1 . switchMapFirst ( function ( value ) {
294
+ var result = e1 . switchFirstMap ( function ( value ) {
295
295
return observableLookup [ value ] ;
296
296
} ) ;
297
297
@@ -310,7 +310,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
310
310
311
311
var observableLookup = { x : x } ;
312
312
313
- var result = e1 . switchMapFirst ( function ( value ) {
313
+ var result = e1 . switchFirstMap ( function ( value ) {
314
314
return observableLookup [ value ] ;
315
315
} ) ;
316
316
@@ -344,7 +344,7 @@ describe('Observable.prototype.switchMapFirst()', function () {
344
344
n : [ 'z' , 'n' , 1 , 3 ] ,
345
345
} ;
346
346
347
- var result = e1 . switchMapFirst ( function ( value ) {
347
+ var result = e1 . switchFirstMap ( function ( value ) {
348
348
return observableLookup [ value ] ;
349
349
} , function ( innerValue , outerValue , innerIndex , outerIndex ) {
350
350
return [ innerValue , outerValue , innerIndex , outerIndex ] ;
0 commit comments