Prevent killing tests when stopping the server

This commit is contained in:
Adria Navarro 2023-01-17 16:07:26 +00:00
parent ffc322da88
commit 70168a20fa
2 changed files with 2 additions and 1 deletions

View File

@ -74,7 +74,7 @@ server.on("close", async () => {
await events.shutdown()
await Thread.shutdown()
api.shutdown()
if (!env.isTest()) {
if (!env.isTest() && !env.isDockerisedTest()) {
process.exit(errCode)
}
})

View File

@ -115,6 +115,7 @@ const environment = {
isInThread: () => {
return inThread
},
isDockerisedTest,
}
// threading can cause memory issues with node-ts in development