File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ function runTests() {
113
113
encoding : "utf8" ,
114
114
} ) ;
115
115
var files = fs . readdirSync ( buildTestDir ) ;
116
+ var failed = [ ] ;
116
117
files . forEach ( function ( file ) {
117
118
var testDir = path . join ( buildTestDir , file ) ;
118
119
if ( file === "node_modules" || ! fs . lstatSync ( testDir ) . isDirectory ( ) ) {
@@ -127,10 +128,16 @@ function runTests() {
127
128
cp . execSync ( `node input.js` , { cwd : testDir , encoding : "utf8" } ) ;
128
129
console . log ( "✅ success in " , file ) ;
129
130
} catch ( e ) {
130
- console . log ( "⚠️ error" , e )
131
+ failed . push ( file ) ;
132
+ console . log ( "❌ error" , e )
131
133
} ;
132
134
}
133
135
} ) ;
136
+ if ( failed . length > 0 ) {
137
+ console . log ( "" ) ;
138
+ console . log ( "❌ Build tests failed" , failed ) ;
139
+ throw ( new Error ( ) ) ;
140
+ }
134
141
}
135
142
}
136
143
You can’t perform that action at this time.
0 commit comments