mirror of
https://github.com/discourse/discourse.git
synced 2025-08-20 18:52:44 +08: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
1 changed files with 2 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue