adventofcode/2021/15/test.mjs
2021-12-15 10:35:43 -05:00

21 lines
500 B
JavaScript

// https://adventofcode.com/2021/day/15
import tap from "tap";
import fs from "fs-extra";
import * as p1 from "./part1.mjs";
import * as p2 from "./part2.mjs";
const sample = p1.processInput('sample');
const input = p1.processInput('input');
tap.test("part1", async (t) => {
t.equal(p1.solution(await sample), 40);
t.equal(p1.solution(await input), 456);
});
tap.test("part2", async (t) => {
t.equal(p2.solution(await sample), 315);
t.equal(p2.solution(await input), 2831);
});