ts-prime
Version:
A utility library for JavaScript and Typescript.
10 lines (9 loc) • 351 B
JavaScript
import { createPipe } from './createPipe';
it('should pipe a single operation', function () {
var fn = createPipe(function (x) { return x * 2; });
expect(fn(1)).toEqual(2);
});
it('should pipe operations', function () {
var fn = createPipe(function (x) { return x * 2; }, function (x) { return x * 3; });
expect(fn(1)).toEqual(6);
});