()
| 395 | }) |
| 396 | |
| 397 | async function cancelRun() { |
| 398 | if (!pendingRunPromise && !pausedController) return false |
| 399 | abortRun = true |
| 400 | if (typeof pendingRunCleanup === 'function') { try { pendingRunCleanup() } catch {} } |
| 401 | if (pausedController) { try { pausedController.resolveContinue() } catch {} ; pausedController = null } |
| 402 | |
| 403 | try { container.mocha().runner?.abort() } catch {} |
| 404 | |
| 405 | if (pendingRunPromise) { |
| 406 | try { await pendingRunPromise.catch(() => {}) } catch {} |
| 407 | } |
| 408 | pendingRunPromise = null |
| 409 | pendingRunResults = null |
| 410 | pendingTestFile = null |
| 411 | pendingStepInfo = null |
| 412 | return true |
| 413 | } |
| 414 | |
| 415 | async function waitForTestResult(runPromise, timeout) { |
| 416 | const pausedPromise = new Promise(resolve => pauseEvents.once('paused', () => resolve('paused'))) |
no test coverage detected