@@ -265,31 +265,30 @@ describe('speech_to_text', function() {
265265 assert . equal ( true , recognizeStream . _events . hasOwnProperty ( 'results' ) ) ;
266266 assert . equal ( true , recognizeStream . _events . hasOwnProperty ( 'error' ) ) ;
267267 assert . equal ( true , recognizeStream . _events . hasOwnProperty ( 'finish' ) ) ;
268+ done ( ) ;
268269 } ) ;
269270
270271 recognizeStream . on ( 'connect' , function ( socket ) {
271272 it ( 'should have a socket connection with a correct config' , function ( done ) {
272273 assert . notStrictEqual ( socket , socket . config , socket . config . fragmentOutgoingMessages ) ;
273274 assert . notStrictEqual ( socket , socket . config , socket . config . fragmentOutgoingMessages ) ;
275+ done ( ) ;
274276 } ) ;
275277 } ) ;
276278
277279 recognizeStream . on ( 'error' , function ( err ) {
278280 it ( 'should throw ECONNRESET with bad credentials' , function ( done ) {
279281 assert . equal ( err . code , 'ECONNRESET' ) ;
280282 assert . equal ( err . errno , 'ECONNRESET' ) ;
281- } )
282- } ) ;
283-
284- recognizeStream . on ( 'connection-close' , function ( reasonCode , description ) {
285- console . log ( 139 , reasonCode ) ;
286- console . log ( 140 , description ) ;
283+ done ( ) ;
284+ } ) ;
287285 } ) ;
288286
289287 recognizeStream . on ( 'results' , function ( obj ) {
290288 console . log ( JSON . stringify ( obj ) ) ;
291289 it ( 'should generate a valid response' , function ( done ) {
292290 assert . equal ( obj , service_response ) ;
291+ done ( ) ;
293292 } ) ;
294293 } ) ;
295294 } ) ;
0 commit comments