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

Function toBeCollapsed

src/matchers/to-be-expanded.ts:26–41  ·  view source on GitHub ↗
(this: jest.MatcherContext, instance: TestInstance)

Source from the content-addressed store, hash-verified

24}
25
26export function toBeCollapsed(this: jest.MatcherContext, instance: TestInstance) {
27 checkHostElement(instance, toBeCollapsed, this);
28
29 return {
30 pass: computeAriaExpanded(instance) === false,
31 message: () => {
32 const matcher = matcherHint(`${this.isNot ? '.not' : ''}.toBeCollapsed`, 'instance', '');
33 return [
34 matcher,
35 '',
36 `Received instance is ${this.isNot ? '' : 'not '}collapsed:`,
37 redent(formatElement(instance), 2),
38 ].join('\n');
39 },
40 };
41}

Callers

nothing calls this directly

Calls 3

checkHostElementFunction · 0.90
computeAriaExpandedFunction · 0.90
formatElementFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…