UNPKG

ts-ds-tool

Version:

Data structure and algorithm of TypeScript

10 lines (8 loc) 301 B
import { combinationRepeat } from "../combinationRepeat"; test("test combinationRepeat func", () => { const arr = [1, 2, 3, 4, 5]; let result = combinationRepeat(arr, 3); expect(result.length).toEqual(20); result = combinationRepeat(arr, 1); expect(result.length).toEqual(5); });