@applicaster/zapp-react-native-utils
Version:
Applicaster Zapp React Native utilities package
16 lines (11 loc) • 483 B
text/typescript
import { isFocusable } from "../";
import { NON_FOCUSABLE_COMPONENTS } from "../const";
const nonFocusableType = NON_FOCUSABLE_COMPONENTS?.[0];
describe("isFocusable", () => {
it("returns true if value doesn't exist in nonFocusable type map", () => {
expect(isFocusable({ component_type: "bar" })).toBeTruthy();
});
it("returns false if value exist in nonFocusable type map", () => {
expect(isFocusable({ component_type: nonFocusableType })).toBeFalsy();
});
});