(instance: TestInstance)
| 194 | } |
| 195 | |
| 196 | function findByQuery(instance: TestInstance) { |
| 197 | return function findFn( |
| 198 | predicate: Predicate, |
| 199 | queryOptions?: Options & WaitForOptions, |
| 200 | { |
| 201 | onTimeout = (error) => appendElementTreeToError(error), |
| 202 | ...waitForOptions |
| 203 | }: WaitForOptions = {}, |
| 204 | ) { |
| 205 | const stackTraceError = new ErrorWithStack('STACK_TRACE_ERROR', findFn); |
| 206 | const deprecatedWaitForOptions = extractDeprecatedWaitForOptions(queryOptions); |
| 207 | |
| 208 | return waitFor( |
| 209 | () => getByQuery(instance, { printElementTree: false })(predicate, queryOptions), |
| 210 | { |
| 211 | ...deprecatedWaitForOptions, |
| 212 | ...waitForOptions, |
| 213 | stackTraceError, |
| 214 | onTimeout, |
| 215 | }, |
| 216 | ); |
| 217 | }; |
| 218 | } |
| 219 | |
| 220 | return { |
| 221 | getBy: getByQuery, |
nothing calls this directly
no test coverage detected
searching dependent graphs…