mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-01-28 15:27:10 -05:00
preserve error stacktrace initializing havenods in beforeAll
This commit is contained in:
parent
222fe7e528
commit
60be0d2862
@ -550,10 +550,10 @@ beforeAll(async () => {
|
||||
for (const config of TestConfig.startupHavenods) promises.push(initHaveno(config));
|
||||
for (const settledPromise of await Promise.allSettled(promises)) {
|
||||
if (settledPromise.status === "fulfilled") {
|
||||
startupHavenods.push((settledPromise as PromiseFulfilledResult<HavenoClient>).value);
|
||||
startupHavenodUrls.push(startupHavenods[startupHavenods.length - 1].getUrl());
|
||||
startupHavenods.push(settledPromise.value);
|
||||
startupHavenodUrls.push(settledPromise.value.getUrl());
|
||||
} else if (!err) {
|
||||
err = new Error((settledPromise as PromiseRejectedResult).reason);
|
||||
err = settledPromise.reason instanceof Error ? settledPromise.reason : new Error(String(settledPromise.reason));
|
||||
}
|
||||
}
|
||||
if (err) throw err;
|
||||
|
Loading…
x
Reference in New Issue
Block a user