UNPKG

@applicaster/zapp-react-native-utils

Version:

Applicaster Zapp React Native utilities package

34 lines (27 loc) 986 B
import { isGallery } from ".."; describe("isGallery", () => { it("should return true if the component type is 'gallery-qb'", () => { const item = { component_type: "gallery-qb" }; expect(isGallery(item)).toBe(true); }); it("should return false if the component type is not 'gallery-qb'", () => { const item = { component_type: "other-component" }; expect(isGallery(item)).toBe(false); }); it("should return false if the component type is undefined", () => { const item = { component_type: undefined }; expect(isGallery(item)).toBe(false); }); it("should return false if the item is null", () => { const item = null; expect(isGallery(item)).toBe(false); }); it("should return false if the item is undefined", () => { const item = undefined; expect(isGallery(item)).toBe(false); }); it("should return false if the item is an empty object", () => { const item = {}; expect(isGallery(item)).toBe(false); }); });