UNPKG

moy-fp

Version:
24 lines (20 loc) 456 B
import __ from '../../src/Function/__' /** * (a -> Boolean) -> [a] -> Boolean */ import any from '../../src/List/any' test('any(not using __), return true', () => { expect( any(x => x > 3)([1, 2, 3, 4]) ).toBeTruthy() }) test('any(not using __), return false', () => { expect( any(x => x > 4)([1, 2, 3, 4]) ).toBeFalsy() }) test('any(using __), return true', () => { expect( any(__, [1, 2, 3, 4])(x => x > 3) ).toBeTruthy() })