UNPKG

@applicaster/zapp-react-native-utils

Version:

Applicaster Zapp React Native utilities package

25 lines (19 loc) 702 B
import { allTruthy } from ".."; describe("allTruthy", () => { it("should return true when all values are true", () => { expect(allTruthy([true, true, true])).toBe(true); }); it("should return false when at least one value is false", () => { expect(allTruthy([true, false, true])).toBe(false); }); it("should return false when all values are false", () => { expect(allTruthy([false, false, false])).toBe(false); }); it("should return false for an empty array", () => { expect(allTruthy([])).toBe(false); }); it("should handle single-element arrays correctly", () => { expect(allTruthy([true])).toBe(true); expect(allTruthy([false])).toBe(false); }); });