@@ -22,10 +22,10 @@ describe('mapAsyncIterator', () => {
22
22
} ) ;
23
23
} ) ;
24
24
25
- it ( 'maps over async iterator ' , async ( ) => {
25
+ it ( 'maps over async iterable ' , async ( ) => {
26
26
const items = [ 1 , 2 , 3 ] ;
27
27
28
- const iterator : $FlowFixMe = {
28
+ const iterable : $FlowFixMe = {
29
29
[ Symbol . asyncIterator ] ( ) {
30
30
return this ;
31
31
} ,
@@ -39,7 +39,7 @@ describe('mapAsyncIterator', () => {
39
39
} ,
40
40
} ;
41
41
42
- const doubles = mapAsyncIterator ( iterator , ( x ) => x + x ) ;
42
+ const doubles = mapAsyncIterator ( iterable , ( x ) => x + x ) ;
43
43
44
44
expect ( await doubles . next ( ) ) . to . deep . equal ( { value : 2 , done : false } ) ;
45
45
expect ( await doubles . next ( ) ) . to . deep . equal ( { value : 4 , done : false } ) ;
@@ -119,10 +119,10 @@ describe('mapAsyncIterator', () => {
119
119
} ) ;
120
120
} ) ;
121
121
122
- it ( 'allows returning early from mapped async iterator ' , async ( ) => {
122
+ it ( 'allows returning early from mapped async iterable ' , async ( ) => {
123
123
const items = [ 1 , 2 , 3 ] ;
124
124
125
- const iterator : any = {
125
+ const iterable : any = {
126
126
[ Symbol . asyncIterator ] ( ) {
127
127
return this ;
128
128
} ,
@@ -134,7 +134,7 @@ describe('mapAsyncIterator', () => {
134
134
} ,
135
135
} ;
136
136
137
- const doubles = mapAsyncIterator ( iterator , ( x ) => x + x ) ;
137
+ const doubles = mapAsyncIterator ( iterable , ( x ) => x + x ) ;
138
138
139
139
expect ( await doubles . next ( ) ) . to . deep . equal ( { value : 2 , done : false } ) ;
140
140
expect ( await doubles . next ( ) ) . to . deep . equal ( { value : 4 , done : false } ) ;
@@ -182,10 +182,10 @@ describe('mapAsyncIterator', () => {
182
182
} ) ;
183
183
} ) ;
184
184
185
- it ( 'allows throwing errors through async iterators ' , async ( ) => {
185
+ it ( 'allows throwing errors through async iterable ' , async ( ) => {
186
186
const items = [ 1 , 2 , 3 ] ;
187
187
188
- const iterator : any = {
188
+ const iterable : any = {
189
189
[ Symbol . asyncIterator ] ( ) {
190
190
return this ;
191
191
} ,
@@ -197,7 +197,7 @@ describe('mapAsyncIterator', () => {
197
197
} ,
198
198
} ;
199
199
200
- const doubles = mapAsyncIterator ( iterator , ( x ) => x + x ) ;
200
+ const doubles = mapAsyncIterator ( iterable , ( x ) => x + x ) ;
201
201
202
202
expect ( await doubles . next ( ) ) . to . deep . equal ( { value : 2 , done : false } ) ;
203
203
expect ( await doubles . next ( ) ) . to . deep . equal ( { value : 4 , done : false } ) ;
0 commit comments