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

Function getTimeoutPromise

lib/recorder.js:428–439  ·  view source on GitHub ↗
(timeoutMs, taskName)

Source from the content-addressed store, hash-verified

426}
427
428function getTimeoutPromise(timeoutMs, taskName) {
429 let timer
430 if (timeoutMs) debug(`Timing out in ${timeoutMs}ms`)
431 return [
432 new Promise((done, reject) => {
433 timer = setTimeout(() => {
434 reject(new TimeoutError(`Action ${taskName} was interrupted on timeout ${timeoutMs}ms`))
435 }, timeoutMs || 2e9)
436 }),
437 timer,
438 ]
439}
440
441function currentQueue() {
442 let session = ''

Callers 1

addFunction · 0.85

Calls 1

debugFunction · 0.85

Tested by

no test coverage detected