UNPKG

foreword

Version:

A JavaScript library for functional data transformation

18 lines (14 loc) 287 B
const test = require('tape') const { unless } = require('../../index') const result = unless( x => x > 3, x => x * 2 ) test('unless predicate is true', t => { t.same(result(4), undefined) t.end() }) test('unless predicate is false', t => { t.same(result(3), 6) t.end() })