function.js 408 B

1234567891011121314151617
  1. 'use strict'
  2. module.exports = {
  3. combine: test => {
  4. const combine = require('../lib/function').combine
  5. test.ok(typeof combine === 'function', 'combine should be a function')
  6. const a = val => val * 10
  7. const b = val => val * 10
  8. const fn = combine(a, b)
  9. test.ok(fn(3) === 300, 'combine should return of all applied functions')
  10. test.done();
  11. }
  12. }