(instance: TestInstance, { printElementTree = true } = {})
| 115 | getMultipleError: (predicate: Predicate, options?: Options) => string, |
| 116 | ): UnboundQueries<Predicate, Options> { |
| 117 | function getAllByQuery(instance: TestInstance, { printElementTree = true } = {}) { |
| 118 | return function getAllFn(predicate: Predicate, options?: Options) { |
| 119 | const results = queryAllByQuery(instance)(predicate, options); |
| 120 | |
| 121 | if (results.length === 0) { |
| 122 | const errorMessage = formatErrorMessage( |
| 123 | getMissingError(predicate, options), |
| 124 | printElementTree, |
| 125 | ); |
| 126 | throw new ErrorWithStack(errorMessage, getAllFn); |
| 127 | } |
| 128 | |
| 129 | return results; |
| 130 | }; |
| 131 | } |
| 132 | |
| 133 | function queryByQuery(instance: TestInstance, { printElementTree = true } = {}) { |
| 134 | return function singleQueryFn(predicate: Predicate, options?: Options) { |
no test coverage detected
searching dependent graphs…