1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| import { secretMap } from "../src/secretMap";
describe("secretMap", () => { it("should return [#####,# # #, ### #, # ##, #####] for n = 5, arr1 = [9, 20, 28, 18, 11], arr2 = [30, 1, 21, 17, 28]", () => { expect(secretMap(5, [9, 20, 28, 18, 11], [30, 1, 21, 17, 28])).toEqual([ "#####", "# # #", "### #", "# ##", "#####" ]); });
it("should return [######, ### #, ## ##, #### , #####, ### # ] for n = 6, arr1 = [46, 33, 33 ,22, 31, 50], arr2 = [27 ,56, 19, 14, 14, 10]", () => { expect(secretMap(6, [46, 33, 33, 22, 31, 50], [27, 56, 19, 14, 14, 10])).toEqual([ "######", "### #", "## ##", " #### ", " #####", "### # " ]); }); });
|