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

Function reset

lib/recorder.js:90–104  ·  view source on GitHub ↗

* Stops current promise chain, calls `catch`. * Resets recorder to initial state. * * @api * @inner

()

Source from the content-addressed store, hash-verified

88 * @inner
89 */
90 reset() {
91 if (promise && running) this.catch()
92 queueId++
93 sessionId = null
94 sessionStack = [] // Clear the session stack
95 asyncErr = null
96 output.log(`${currentQueue()} Starting recording promises`)
97 promise = Promise.resolve()
98 oldPromises = []
99 tasks = []
100 ignoredErrs = []
101 this.session.running = false
102 // reset this retries makes the retryFailedStep plugin won't work if there is Before/BeforeSuit block due to retries is undefined on Scenario
103 // this.retries = [];
104 },
105
106 /**
107 * @name CodeceptJS.recorder~session

Callers

nothing calls this directly

Calls 2

currentQueueFunction · 0.85
logMethod · 0.80

Tested by

no test coverage detected