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

Function toBeExpanded

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

Source from the content-addressed store, hash-verified

7import { checkHostElement } from './utils';
8
9export function toBeExpanded(this: jest.MatcherContext, instance: TestInstance) {
10 checkHostElement(instance, toBeExpanded, this);
11
12 return {
13 pass: computeAriaExpanded(instance) === true,
14 message: () => {
15 const matcher = matcherHint(`${this.isNot ? '.not' : ''}.toBeExpanded`, 'instance', '');
16 return [
17 matcher,
18 '',
19 `Received instance is ${this.isNot ? '' : 'not '}expanded:`,
20 redent(formatElement(instance), 2),
21 ].join('\n');
22 },
23 };
24}
25
26export function toBeCollapsed(this: jest.MatcherContext, instance: TestInstance) {
27 checkHostElement(instance, toBeCollapsed, this);

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…