UNPKG

moy-fp

Version:
24 lines (20 loc) 525 B
import __ from '../../src/Function/__' /** * ((a, b, ..., m) -> Boolean) -> ((a, b, ..., m) -> Boolean) -> ((a, b, ..., m) -> Boolean) */ import both from '../../src/Logic/both' test('both(not using __), return true', () => { expect( both(a => a > 0)(a => a < 3)(2) ).toBeTruthy() }) test('both(not using __), return false', () => { expect( both(a => a > 0)(a => a < 3)(4) ).toBeFalsy() }) test('both(using __), return true', () => { expect( both(__, a => a < 3)(a => a > 0)(2) ).toBeTruthy() })