UNPKG

@applicaster/zapp-react-native-utils

Version:

Applicaster Zapp React Native utilities package

40 lines (36 loc) 857 B
import { focusManager } from "../index.ts"; describe("focusManager", () => { it("should be defined", () => { expect(focusManager).toBeDefined(); }); it("should have expected methods", () => { const expectedMethods = [ "register", "unregister", "moveFocus", "getCurrentFocus", "getGroupById", "setFocus", "press", "blur", "on", "invokeHandler", "removeHandler", "longPress", "pressOut", "enableFocus", "setInitialFocus", "disableFocus", "isFocusDisabled", "getCurrentFocusNode", "focusableTree", "getGroupRootById", "isGroupItemFocused", "recoverFocus", "isCurrentFocusOnTheTopScreen", ]; expectedMethods.forEach((method) => { expect(focusManager[method]).toBeDefined(); }); }); });