(expectation: () => T, options?: WaitForOptions)
| 220 | } |
| 221 | |
| 222 | export function waitFor<T>(expectation: () => T, options?: WaitForOptions): Promise<T> { |
| 223 | // Being able to display a useful stack trace requires generating it before doing anything async |
| 224 | const stackTraceError = new ErrorWithStack('STACK_TRACE_ERROR', waitFor); |
| 225 | const optionsWithStackTrace = { stackTraceError, ...options }; |
| 226 | |
| 227 | return wrapAsync(() => waitForInternal(expectation, optionsWithStackTrace)); |
| 228 | } |
no test coverage detected
searching dependent graphs…