param component param name export const runComponentTests = ( component , name = '' ) => { test ( `${ name } should have incoming/outgoing stream` , ( ) => { expect ( component . incoming ) . toBeDefined ( ) ; expect ( component . outgoing ) . toBeDefined ( ) ; } ) ; test ( `${ name } should have complementary streams` , ( ) => { expect ( component . incoming . readable ) . toEqual ( component . outgoing . writable ) ; expect ( component . incoming . writable ) . toEqual ( component . outgoing . readable ) ; } ) ; test ( `${ name } should have objectMode on all streams` , ( ) => { const incoming = component . incoming ; const outgoing = component . outgoing ; incoming . ReadableState && expect ( incoming . ReadableState . objectMode ) . toBe ( true ) ; incoming . WritableState && expect ( incoming . WritableState . objectMode ) . toBe ( true ) ; outgoing . ReadableState && expect ( outgoing . ReadableState . objectMode ) . toBe ( true ) ; outgoing . WritableState && expect ( outgoing . WritableState . objectMode ) . toBe ( true ) ; } ) ; } ;