UNPKG

tsoid

Version:

Typed functional library to deal with async operations.

16 lines (15 loc) 543 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const index_1 = require("../../index"); describe('compose', () => { const fn1 = (val) => `fn1(${val})`; const fn2 = (val) => `fn2(${val})`; const fn3 = (val) => `fn3(${val})`; const fn4 = (val) => `fn4(${val})`; const fn5 = (val) => `fn5(${val})`; it('compose', () => { const fn = index_1.compose(fn1, fn2, fn3, fn4, fn5); const result = fn('value'); expect(result).toBe('fn1(fn2(fn3(fn4(fn5(value)))))'); }); });