blob: 17dc63def1a4500c5ca9bbe6321c65305c5d276f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import { expect, test } from "bun:test";
import { main as part1 } from "./part_1";
import { main as part2 } from "./part_2";
const example = `Time: 7 15 30
Distance: 9 40 200`.split("\n");
test("part1", async () => {
const answer = 288;
const res = await part1(example);
expect(res).toEqual(answer);
});
test("part2", async () => {
const answer = 71503;
const res = await part2(example);
expect(res).toEqual(answer);
});
|