| Index: test_runner.js |
| =================================================================== |
| --- a/test_runner.js |
| +++ b/test_runner.js |
| @@ -148,33 +148,38 @@ |
| Promise.all( |
| processes.map(currentProcess => |
| runnerDefinitions[currentProcess]( |
| bundle, bundleFilename, |
| browserFiles.map( |
| file => path.relative(path.join(__dirname, "test", "browser"), |
| file).replace(/\.js$/, "") |
| ) |
| + ).catch(error => Promise.reject( |
| + `Unit test "${currentProcess}" failed: ${error}`) |
| ) |
| ) |
| ) |
| ); |
| } |
| if (process.argv.length > 2) |
| addTestPaths(process.argv.slice(2), true); |
| else |
| { |
| addTestPaths( |
| [path.join(__dirname, "test"), path.join(__dirname, "test", "browser")], |
| true |
| ); |
| } |
| -Promise.resolve(runBrowserTests(runnerProcesses)).catch(error => |
| -{ |
| - console.error("Failed running browser tests"); |
| - console.error(error); |
| -}).then(() => |
| +Promise.resolve(runBrowserTests(runnerProcesses)).then(() => |
| { |
| if (unitFiles.length) |
| nodeunit.reporters.default.run(unitFiles); |
| +}).catch(error => |
| +{ |
| + if (!error) |
| + console.error("Failed running browser tests"); |
|
Sebastian Noack
2018/09/19 08:16:51
In which case if the above promise rejected with n
hub
2018/09/20 00:19:56
Fixed it.
|
| + else |
| + console.error(error); |
| + process.exit(1); |
| }); |