UNPKG

moy-fp

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