Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions run-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,15 @@ ${output}
}
}

let exiting = false

const cleanUpAndExit = async (code) => {
if (exiting) {
return
}
exiting = true
console.log(`exiting with code ${code}`)

if (process.env.NEXT_TEST_STARTER) {
await fsp.rm(process.env.NEXT_TEST_STARTER, {
recursive: true,
Expand All @@ -140,11 +148,7 @@ const cleanUpAndExit = async (code) => {
if (process.env.CI) {
await maybeLogSummary()
}
console.log(`exiting with code ${code}`)

setTimeout(() => {
process.exit(code)
}, 1)
process.exit(code)
}

const isMatchingPattern = (pattern, file) => {
Expand Down