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

Function findAll

src/helpers/find-all.ts:17–34  ·  view source on GitHub ↗
(
  root: TestInstance,
  predicate: (instance: TestInstance) => boolean,
  options: FindAllOptions = {},
)

Source from the content-addressed store, hash-verified

15}
16
17export function findAll(
18 root: TestInstance,
19 predicate: (instance: TestInstance) => boolean,
20 options: FindAllOptions = {},
21): TestInstance[] {
22 const { matchDeepestOnly } = options;
23 const results = root.queryAll(predicate, { matchDeepestOnly });
24
25 const includeHiddenElements =
26 options?.includeHiddenElements ?? options?.hidden ?? getConfig()?.defaultIncludeHiddenElements;
27
28 if (includeHiddenElements) {
29 return results;
30 }
31
32 const cache = new WeakMap<TestInstance>();
33 return results.filter((instance) => !isHiddenFromAccessibility(instance, { cache }));
34}

Callers 8

queryAllByTextFunction · 0.90
queryAllByLabelTextFunction · 0.90
queryAllByDisplayValueFunction · 0.90
queryAllByTestIdFunction · 0.90
queryAllByHintTextFunction · 0.90
queryAllByRoleFunction · 0.90
computeAriaLabelFunction · 0.90

Calls 2

getConfigFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…