* @param {string} [name] * @inner
(name)
| 147 | * @inner |
| 148 | */ |
| 149 | restore(name) { |
| 150 | tasks.push('<---') |
| 151 | debug(`${currentQueue()}Finalize <${name}> session`) |
| 152 | this.running = false |
| 153 | this.catch(errFn) |
| 154 | promise = promise.then(() => oldPromises.pop()) |
| 155 | |
| 156 | // Restore parent session from stack if available |
| 157 | if (sessionStack.length > 0) { |
| 158 | const parentSession = sessionStack.pop() |
| 159 | sessionId = parentSession.id |
| 160 | this.running = parentSession.running |
| 161 | debug(`${currentQueue()}Restored parent session <${sessionId}>`) |
| 162 | } else { |
| 163 | sessionId = null |
| 164 | } |
| 165 | }, |
| 166 | |
| 167 | /** |
| 168 | * @param {function} fn |
nothing calls this directly
no test coverage detected