UNPKG

ts-prime

Version:

A utility library for JavaScript and Typescript.

10 lines (9 loc) 373 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var minBy_1 = require("./minBy"); test('minBy', function () { expect(minBy_1.minBy([{ a: 1 }, { a: 2 }], function (q) { return q.a; })).toEqual([{ a: 1 }]); }); test('maxBy', function () { expect(minBy_1.maxBy([{ a: 1 }, { a: 2 }], function (q) { return q.a; })).toEqual([{ a: 2 }]); });