MCPcopy Index your code
hub / github.com/callstack/react-native-testing-library / getAllByQuery

Function getAllByQuery

src/queries/make-queries.ts:117–131  ·  view source on GitHub ↗
(instance: TestInstance, { printElementTree = true } = {})

Source from the content-addressed store, hash-verified

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) {

Callers 1

findAllByQueryFunction · 0.85

Calls 2

formatErrorMessageFunction · 0.85
getMissingErrorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…