Skip to content

Commit

Permalink
ci: fix tests on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
DorianMazur committed Jul 31, 2024
1 parent af937b4 commit b074164
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions tests/_testHelpers/setupTeardown.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,10 @@ export async function setup(options) {

export async function teardown() {
// Forcefully kill the serverless process as it spawns child processes
await new Promise((resolve) => {
treeKill(serverlessProcess.pid, "SIGKILL", (err) => {
if (err) {
console.error("Failed to kill process:", err)
}
resolve()
})
})
serverlessProcess = null
treeKill(serverlessProcess.pid, "SIGINT")
try {
await serverlessProcess
} catch {
//
}
}

0 comments on commit b074164

Please sign in to comment.