@@ -353,7 +353,12 @@ describe('dial', () => {
353
353
354
354
// Dial first no loopback address
355
355
const conn = await ws . dial ( addrs [ 0 ] , { upgrader } )
356
- const s = goodbye ( { source : [ uint8ArrayFromString ( 'hey' ) ] , sink : all } )
356
+ const s = goodbye ( {
357
+ source : ( async function * ( ) {
358
+ yield uint8ArrayFromString ( 'hey' )
359
+ } ) ( ) ,
360
+ sink : all
361
+ } )
357
362
const stream = await conn . newStream ( [ protocol ] )
358
363
359
364
await expect ( pipe (
@@ -404,7 +409,12 @@ describe('dial', () => {
404
409
405
410
it ( 'dial ip4' , async ( ) => {
406
411
const conn = await ws . dial ( ma , { upgrader } )
407
- const s = goodbye ( { source : [ uint8ArrayFromString ( 'hey' ) ] , sink : all } )
412
+ const s = goodbye ( {
413
+ source : ( async function * ( ) {
414
+ yield uint8ArrayFromString ( 'hey' )
415
+ } ) ( ) ,
416
+ sink : all
417
+ } )
408
418
const stream = await conn . newStream ( [ protocol ] )
409
419
410
420
const res = await pipe ( s , stream , toBuffers , s )
@@ -438,7 +448,12 @@ describe('dial', () => {
438
448
439
449
it ( 'dial ip6' , async ( ) => {
440
450
const conn = await ws . dial ( ma , { upgrader } )
441
- const s = goodbye ( { source : [ uint8ArrayFromString ( 'hey' ) ] , sink : all } )
451
+ const s = goodbye ( {
452
+ source : ( async function * ( ) {
453
+ yield uint8ArrayFromString ( 'hey' )
454
+ } ) ( ) ,
455
+ sink : all
456
+ } )
442
457
const stream = await conn . newStream ( [ protocol ] )
443
458
444
459
await expect ( pipe ( s , stream , toBuffers , s ) ) . to . eventually . deep . equal ( [ uint8ArrayFromString ( 'hey' ) ] )
@@ -449,7 +464,9 @@ describe('dial', () => {
449
464
const conn = await ws . dial ( ma , { upgrader } )
450
465
451
466
const s = goodbye ( {
452
- source : [ uint8ArrayFromString ( 'hey' ) ] ,
467
+ source : ( async function * ( ) {
468
+ yield uint8ArrayFromString ( 'hey' )
469
+ } ) ( ) ,
453
470
sink : all
454
471
} )
455
472
const stream = await conn . newStream ( [ protocol ] )
0 commit comments