mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
DEV: Correct error handling in run-qunit
runAllTests is an async function, so the try/catch block does not help. The function always returns a promise, so we need to use `.catch` to handle errors. Previously, raised errors were ignored, and the process continued running until it timed out.
This commit is contained in:
parent
4e130f1e03
commit
584021ca38
@ -127,12 +127,10 @@ async function runAllTests() {
|
||||
});
|
||||
}
|
||||
|
||||
try {
|
||||
runAllTests();
|
||||
} catch (e) {
|
||||
runAllTests().catch(e => {
|
||||
console.log("Failed to run tests: " + e);
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
||||
// The following functions are converted to strings
|
||||
// And then sent to chrome to be evalaluated
|
||||
|
Loading…
Reference in New Issue
Block a user