blob: 1a654c139bd1d26c4fa862d208fa8456117724c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
import { expect, test } from "bun:test";
import { main as part1 } from "./part_1";
import { main as part2 } from "./part_2";
const example = `467..114..
...*......
..35..633.
......#...
617*......
.....+.58.
..592.....
......755.
...$.*....
.664.598..`.split("\n");
test("part1", async () => {
const answer = 4361;
const res = await part1(example);
expect(res).toEqual(answer);
});
test("part2", async () => {
const answer = 467835;
const res = await part2(example);
expect(res).toEqual(answer);
});
|