@@ -174,6 +174,7 @@ function testModuleVersions (options, results) {
174174 } )
175175 var checkAllPromise = checkPromises . reduce ( q . when , q ( ) )
176176 if ( options . keep ) {
177+ debug ( 'keep working updates for %s' , name )
177178 checkAllPromise = checkAllPromise . then ( function ( result ) {
178179 verify . array ( result , 'expected array of results' , result )
179180 var lastSuccess = _ . last ( _ . filter ( result , { works : true } ) )
@@ -194,10 +195,16 @@ function testModuleVersions (options, results) {
194195 } )
195196 } else {
196197 checkAllPromise = checkAllPromise
197- . then ( restoreVersionFunc )
198+ . then ( restoreVersionFunc , ( err ) => {
199+ console . error ( 'Could not check all versions' )
200+ console . error ( err )
201+ throw err
202+ } )
198203 }
199204 checkAllPromise
200205 . then ( function ( result ) {
206+ debug ( 'got result' )
207+ debug ( result )
201208 check . verify . array ( result , 'could not get result array' )
202209 results . push ( result )
203210 deferred . resolve ( results )
@@ -290,13 +297,15 @@ function testModuleVersion (options, results) {
290297 } , function ( error ) {
291298 reportFailure ( nameVersion + ' tests failed :(' , options . color )
292299
300+ debug ( 'sending stats results' )
293301 stats . sendUpdateResult ( {
294302 name : options . name ,
295303 from : options . currentVersion ,
296304 to : options . version ,
297305 success : false
298306 } )
299307
308+ debug ( 'checking error code' , error . code )
300309 verify . number ( error . code , 'expected code in error ' +
301310 JSON . stringify ( error , null , 2 ) )
302311
@@ -324,6 +333,8 @@ function testPromise (options, command) {
324333 if ( command ) {
325334 verify . unemptyString ( command , 'expected string command, not ' + command )
326335 testFunction = execTest . bind ( null , options , command )
336+ } else {
337+ debug ( 'missing test command' )
327338 }
328339 return testFunction
329340}
0 commit comments