MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / cancelRun

Function cancelRun

bin/mcp-server.js:397–413  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

395})
396
397async 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
415async function waitForTestResult(runPromise, timeout) {
416 const pausedPromise = new Promise(resolve => pauseEvents.once('paused', () => resolve('paused')))

Callers 3

waitForTestResultFunction · 0.85
closeBrowserFunction · 0.85
mcp-server.jsFile · 0.85

Calls 1

mochaMethod · 0.80

Tested by

no test coverage detected