1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| import { divisibleNumberArray } from "../src/divisibleNumberArray";
describe("divisibleNumberArray", () => { it("should return [5, 10] for [5, 9, 7, 10] and 5", () => { expect(divisibleNumberArray([5, 9, 7, 10], 5)).toEqual([5, 10]); });
it("should return [1,2,3,36] for [2,36,1,3] and 1", () => { expect(divisibleNumberArray([2, 36, 1, 3], 1)).toEqual([1, 2, 3, 36]); });
it("should return [-1] for [3,2,6] and 10", () => { expect(divisibleNumberArray([3, 2, 6], 10)).toEqual([-1]); }); });
|