@applicaster/zapp-react-native-utils
Version:
Applicaster Zapp React Native utilities package
34 lines (27 loc) • 1.05 kB
text/typescript
import { isScreenPicker } from "..";
describe("isScreenPicker", () => {
it("should return true if the component type is 'screen-picker-qb-tv'", () => {
const item = { component_type: "screen-picker-qb-tv" };
expect(isScreenPicker(item)).toBe(true);
});
it("should return false if the component type is not 'screen-picker-qb-tv'", () => {
const item = { component_type: "other-component" };
expect(isScreenPicker(item)).toBe(false);
});
it("should return false if the component type is undefined", () => {
const item = { component_type: undefined };
expect(isScreenPicker(item)).toBe(false);
});
it("should return false if the item is null", () => {
const item = null;
expect(isScreenPicker(item)).toBe(false);
});
it("should return false if the item is undefined", () => {
const item = undefined;
expect(isScreenPicker(item)).toBe(false);
});
it("should return false if the item is an empty object", () => {
const item = {};
expect(isScreenPicker(item)).toBe(false);
});
});