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

Function isHostSwitch

src/helpers/host-component-names.ts:38–40  ·  view source on GitHub ↗
(instance: TestInstance | null)

Source from the content-addressed store, hash-verified

36 * @param instance The instance to check.
37 */
38export function isHostSwitch(instance: TestInstance | null) {
39 return typeof instance?.type === 'string' && HOST_SWITCH_NAMES.includes(instance.type);
40}
41
42/**
43 * Checks if the given element is a host ScrollView element.

Callers 4

isAccessibilityElementFunction · 0.90
computeAriaCheckedFunction · 0.90
toBeCheckedFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…