UNPKG

tsoid

Version:

Typed functional library to deal with async operations.

14 lines (13 loc) 485 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const index_1 = require("../../index"); describe('pipe', () => { it('Should pipe successfully', () => { const fn1 = (arg) => `fn1(${arg})`; const fn2 = (arg) => `fn2(${arg})`; const fn3 = (arg) => `fn3(${arg})`; const fn4 = (arg) => `fn4(${arg})`; const piped = index_1.pipe(fn1, fn2, fn3, fn4); expect(piped(1)).toBe('fn4(fn3(fn2(fn1(1))))'); }); });