@@ -38,11 +38,14 @@ function runTests () {
38
38
cwd : ca ,
39
39
stdio : "inherit"
40
40
}
41
- common . npm ( [ "install" ] , opts , function ( err , code ) {
41
+ common . npm ( [ "install" ] , opts , function ( err , code , stdout , stderr ) {
42
42
if ( err ) { throw err }
43
43
if ( code ) {
44
44
return test ( "need install to work" , function ( t ) {
45
- t . fail ( "install failed with: " + code )
45
+ t . fail (
46
+ "install failed with: " + code +
47
+ '\nstdout: ' + stdout +
48
+ '\nstderr: ' + stderr )
46
49
t . end ( )
47
50
} )
48
51
@@ -52,24 +55,32 @@ function runTests () {
52
55
env : env ,
53
56
stdio : "inherit"
54
57
}
55
- common . npm ( [ "test" , "--" , "-Rtap" ] , opts , function ( err , code ) {
56
- if ( err ) { throw err }
57
- if ( code ) {
58
- return test ( "need test to work" , function ( t ) {
59
- t . fail ( "test failed with: " + code )
60
- t . end ( )
58
+ common . npm (
59
+ [
60
+ "test" , "--" , "-Rtap"
61
+ ] ,
62
+ opts ,
63
+ function ( err , code , stdout , stderr ) {
64
+ if ( err ) { throw err }
65
+ if ( code ) {
66
+ return test ( "need test to work" , function ( t ) {
67
+ t . fail (
68
+ "test failed with: " + code +
69
+ '\nstdout: ' + stdout +
70
+ '\nstderr: ' + stderr )
71
+ t . end ( )
72
+ } )
73
+ }
74
+ opts = {
75
+ cwd : ca ,
76
+ env : env ,
77
+ stdio : "inherit"
78
+ }
79
+ common . npm ( [ "prune" , "--production" ] , opts , function ( err , code ) {
80
+ if ( err ) { throw err }
81
+ process . exit ( code || 0 )
82
+ } )
61
83
} )
62
84
}
63
- opts = {
64
- cwd : ca ,
65
- env : env ,
66
- stdio : "inherit"
67
- }
68
- common . npm ( [ "prune" , "--production" ] , opts , function ( err , code ) {
69
- if ( err ) { throw err }
70
- process . exit ( code || 0 )
71
- } )
72
- } )
73
- }
74
85
} )
75
86
}
0 commit comments