(cb: Function, timeout?: number, updateCb?: Function)
| 219 | } |
| 220 | |
| 221 | private addCallback(cb: Function, timeout?: number, updateCb?: Function) { |
| 222 | let timeoutId: any = -1; |
| 223 | if (timeout && timeout > 0) { |
| 224 | timeoutId = setTimeout(() => { |
| 225 | this._callbacks = this._callbacks.filter((cb) => cb.timeoutId !== timeoutId); |
| 226 | cb(); |
| 227 | }, timeout); |
| 228 | } |
| 229 | this._callbacks.push(<WaitCallback>{doneCb: cb, timeoutId: timeoutId, updateCb: updateCb}); |
| 230 | } |
| 231 | |
| 232 | /** |
| 233 | * Wait for the application to be stable with a timeout. If the timeout is reached before that |
no test coverage detected