UNPKG

ts-prime

Version:

A utility library for JavaScript and Typescript.

12 lines (11 loc) 403 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dropLast_1 = require("./dropLast"); var arr = [1, 2, 3, 4, 5]; test('should drop last', function () { expect(dropLast_1.dropLast(arr, 2)).toEqual([1, 2, 3]); }); test('should not drop last', function () { expect(dropLast_1.dropLast(arr, 0)).toEqual(arr); expect(dropLast_1.dropLast(arr, -0)).toEqual(arr); });