mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-08-06 05:24:15 -04:00
terminate monero-javascript worker at end of tests
This commit is contained in:
parent
60d250933b
commit
ce2fc7cf75
1 changed files with 7 additions and 3 deletions
|
@ -212,12 +212,16 @@ beforeEach(async () => {
|
|||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
||||
// release haveno processes
|
||||
const promises = [];
|
||||
for (const havenod of startupHavenods) {
|
||||
if (havenod.getProcess()) promises.push(releaseHavenoProcess(havenod));
|
||||
else promises.push(havenod.disconnect());
|
||||
promises.push(havenod.getProcess() ? releaseHavenoProcess(havenod) : havenod.disconnect());
|
||||
}
|
||||
return Promise.all(promises);
|
||||
await Promise.all(promises);
|
||||
|
||||
// terminate monero-javascript worker
|
||||
(await monerojs.LibraryUtils.getWorker()).terminate();
|
||||
});
|
||||
|
||||
// ----------------------------------- TESTS ----------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue