11import '../asynciterablehelpers' ;
2- import { from } from 'ix/asynciterable' ;
2+ import { as } from 'ix/asynciterable' ;
33import { map , toDOMStream } from 'ix/asynciterable/operators' ;
44
55// eslint-disable-next-line consistent-return
@@ -10,7 +10,7 @@ import { map, toDOMStream } from 'ix/asynciterable/operators';
1010 } ) ;
1111 }
1212
13- const stringsItr = ( ) => from ( [ 1 , 2 , 3 ] ) . pipe ( map ( ( i ) => `${ i } ` ) ) ;
13+ const stringsItr = ( ) => as ( [ 1 , 2 , 3 ] ) . pipe ( map ( ( i ) => `${ i } ` ) ) ;
1414 const buffersItr = ( ) => stringsItr ( ) . pipe ( map ( ( val ) => Buffer . from ( val ) ) ) ;
1515 const objectsItr = ( ) => stringsItr ( ) . pipe ( map ( ( val ) => ( { val } ) ) ) ;
1616 const compare = < T > ( a : T , b : T ) => {
@@ -31,17 +31,17 @@ import { map, toDOMStream } from 'ix/asynciterable/operators';
3131 const expectedObjects = expectedStrings . map ( ( val ) => ( { val } ) ) ;
3232 const expectedBuffers = expectedStrings . map ( ( x ) => Buffer . from ( x ) ) ;
3333 test ( 'yields Strings' , async ( ) => {
34- const expected = from ( expectedStrings ) ;
34+ const expected = as ( expectedStrings ) ;
3535 const actual = stringsItr ( ) . pipe ( toDOMStream ( ) ) ;
3636 await expect ( actual ) . toEqualStream ( expected , compare ) ;
3737 } ) ;
3838 test ( 'yields Buffers' , async ( ) => {
39- const expected = from ( expectedBuffers ) ;
39+ const expected = as ( expectedBuffers ) ;
4040 const actual = buffersItr ( ) . pipe ( toDOMStream ( ) ) ;
4141 await expect ( actual ) . toEqualStream ( expected , compare ) ;
4242 } ) ;
4343 test ( 'yields Objects' , async ( ) => {
44- const expected = from ( expectedObjects ) ;
44+ const expected = as ( expectedObjects ) ;
4545 const actual = objectsItr ( ) . pipe ( toDOMStream ( ) ) ;
4646 await expect ( actual ) . toEqualStream ( expected , compare ) ;
4747 } ) ;
@@ -51,14 +51,14 @@ import { map, toDOMStream } from 'ix/asynciterable/operators';
5151 const expectedStrings = [ '123' ] ;
5252 const expectedBuffers = expectedStrings . map ( ( x ) => Buffer . from ( x ) ) ;
5353 test ( 'yields Strings' , async ( ) => {
54- const expected = from ( expectedBuffers ) ;
54+ const expected = as ( expectedBuffers ) ;
5555 const actual = stringsItr ( )
5656 . pipe ( map ( ( x ) => Buffer . from ( x ) ) )
5757 . pipe ( toDOMStream ( { type : 'bytes' } ) ) ;
5858 await expect ( actual ) . toEqualStream ( expected , compare ) ;
5959 } ) ;
6060 test ( 'yields Buffers' , async ( ) => {
61- const expected = from ( expectedBuffers ) ;
61+ const expected = as ( expectedBuffers ) ;
6262 const actual = buffersItr ( ) . pipe ( toDOMStream ( { type : 'bytes' } ) ) ;
6363 await expect ( actual ) . toEqualStream ( expected , compare ) ;
6464 } ) ;
@@ -68,14 +68,14 @@ import { map, toDOMStream } from 'ix/asynciterable/operators';
6868 const expectedStrings = [ '123' ] ;
6969 const expectedBuffers = expectedStrings . map ( ( x ) => Buffer . from ( x ) ) ;
7070 test ( 'yields Strings' , async ( ) => {
71- const expected = from ( expectedBuffers ) ;
71+ const expected = as ( expectedBuffers ) ;
7272 const actual = stringsItr ( )
7373 . pipe ( map ( ( x ) => Buffer . from ( x ) ) )
7474 . pipe ( toDOMStream ( { type : 'bytes' , autoAllocateChunkSize : 1024 } ) ) ;
7575 await expect ( actual ) . toEqualStream ( expected , compare ) ;
7676 } ) ;
7777 test ( 'yields Buffers' , async ( ) => {
78- const expected = from ( expectedBuffers ) ;
78+ const expected = as ( expectedBuffers ) ;
7979 const actual = buffersItr ( ) . pipe (
8080 toDOMStream ( { type : 'bytes' , autoAllocateChunkSize : 1024 } )
8181 ) ;
0 commit comments