mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-08-07 05:52:23 -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 () => {
|
afterAll(async () => {
|
||||||
|
|
||||||
|
// release haveno processes
|
||||||
const promises = [];
|
const promises = [];
|
||||||
for (const havenod of startupHavenods) {
|
for (const havenod of startupHavenods) {
|
||||||
if (havenod.getProcess()) promises.push(releaseHavenoProcess(havenod));
|
promises.push(havenod.getProcess() ? releaseHavenoProcess(havenod) : havenod.disconnect());
|
||||||
else promises.push(havenod.disconnect());
|
|
||||||
}
|
}
|
||||||
return Promise.all(promises);
|
await Promise.all(promises);
|
||||||
|
|
||||||
|
// terminate monero-javascript worker
|
||||||
|
(await monerojs.LibraryUtils.getWorker()).terminate();
|
||||||
});
|
});
|
||||||
|
|
||||||
// ----------------------------------- TESTS ----------------------------------
|
// ----------------------------------- TESTS ----------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue