File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -147,10 +147,17 @@ async function runKarma(testFile, testDescription) {
147
147
* of all child processes. This allows any failing test to result in a CI
148
148
* build failure for the whole Saucelabs run.
149
149
*/
150
- async function runNextTest ( maxExitCode = 0 ) {
150
+ async function runNextTest ( maxExitCode = 0 , results = { } ) {
151
151
// When test queue is empty, exit with code 0 if no tests failed or
152
152
// 1 if any tests failed.
153
- if ( ! testFiles . length ) process . exit ( maxExitCode ) ;
153
+ if ( ! testFiles . length ) {
154
+ for ( const fileName in results ) {
155
+ if ( results [ fileName ] > 0 ) {
156
+ console . log ( `FAILED: ${ fileName } ` ) ;
157
+ }
158
+ }
159
+ process . exit ( maxExitCode ) ;
160
+ }
154
161
const nextFile = testFiles . shift ( ) ;
155
162
let exitCode ;
156
163
try {
@@ -159,7 +166,10 @@ async function runNextTest(maxExitCode = 0) {
159
166
console . error ( chalk `{red [${ nextFile } ] ERROR: ${ e . message } }` ) ;
160
167
exitCode = 1 ;
161
168
}
162
- runNextTest ( Math . max ( exitCode , maxExitCode ) ) ;
169
+ runNextTest ( Math . max ( exitCode , maxExitCode ) , {
170
+ ...results ,
171
+ [ nextFile ] : exitCode
172
+ } ) ;
163
173
}
164
174
165
175
runNextTest ( ) ;
You can’t perform that action at this time.
0 commit comments