@@ -37,19 +37,10 @@ function unpiped(){
3737 return fs . createReadStream ( exists ) ;
3838}
3939
40- function exec ( ) {
41- return cp . exec ( 'echo hello world' ) ;
42- }
43-
44- function spawn ( ) {
45- return cp . spawn ( 'echo' , [ 'hello world' ] ) ;
46- }
47-
4840describe ( 'streams' , function ( ) {
49-
5041 it ( 'should handle a successful stream' , function ( done ) {
5142 asyncDone ( success , function ( err ) {
52- expect ( err ) . to . equal ( null ) ;
43+ expect ( err ) . to . not . be . instanceof ( Error ) ;
5344 done ( ) ;
5445 } ) ;
5546 } ) ;
@@ -65,29 +56,15 @@ describe('streams', function(){
6556 asyncDone ( function ( cb ) {
6657 return success ( ) . on ( 'end' , function ( ) { cb ( null , 3 ) ; } ) ;
6758 } , function ( err , result ) {
68- expect ( err ) . to . equal ( null ) ;
59+ expect ( err ) . to . not . be . instanceof ( Error ) ;
6960 expect ( result ) . to . equal ( 3 ) ; // to know we called the callback
7061 done ( ) ;
7162 } ) ;
7263 } ) ;
7364
7465 it ( 'consumes an unpiped readable stream' , function ( done ) {
7566 asyncDone ( unpiped , function ( err ) {
76- expect ( err ) . to . equal ( null ) ;
77- done ( ) ;
78- } ) ;
79- } ) ;
80-
81- it ( 'should handle exec' , function ( done ) {
82- asyncDone ( exec , function ( err ) {
83- expect ( err ) . to . equal ( null ) ;
84- done ( ) ;
85- } ) ;
86- } ) ;
87-
88- it ( 'should handle spawn' , function ( done ) {
89- asyncDone ( spawn , function ( err ) {
90- expect ( err ) . to . equal ( null ) ;
67+ expect ( err ) . to . not . be . instanceof ( Error ) ;
9168 done ( ) ;
9269 } ) ;
9370 } ) ;
0 commit comments