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

Function checkHostElement

src/matchers/utils.ts:47–55  ·  view source on GitHub ↗
(
  instance: TestInstance | null | undefined,
  matcherFn: jest.CustomMatcher,
  context: jest.MatcherContext,
)

Source from the content-addressed store, hash-verified

45 * @param context Jest matcher context used for formatting error.
46 */
47export function checkHostElement(
48 instance: TestInstance | null | undefined,
49 matcherFn: jest.CustomMatcher,
50 context: jest.MatcherContext,
51): asserts instance is TestInstance {
52 if (!isTestInstance(instance)) {
53 throw new HostElementTypeError(instance, matcherFn, context);
54 }
55}
56
57export function formatMessage(
58 matcher: string,

Callers 15

toBeVisibleFunction · 0.90
toBePartiallyCheckedFunction · 0.90
toHaveStyleFunction · 0.90
toBeBusyFunction · 0.90
toHavePropFunction · 0.90
toContainElementFunction · 0.90
toHaveTextContentFunction · 0.90
toHaveAccessibleNameFunction · 0.90
toBeSelectedFunction · 0.90
toBeDisabledFunction · 0.90
toBeEnabledFunction · 0.90
toHaveAccessibilityValueFunction · 0.90

Calls 1

isTestInstanceFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…