diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-12-05 22:13:08 -0700 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-12-05 22:13:08 -0700 |
commit | 44973098cbd5079cd782b6b1b00860d39bd2400d (patch) | |
tree | 1d8fc2c6d0b5a3860e7b0f490d7f123c3f8d9c5c /aoc_2023/day-06/example.test.ts | |
parent | 7214ac768a10df7f9361c969ddda7ef4afa84416 (diff) | |
download | aoc-44973098cbd5079cd782b6b1b00860d39bd2400d.tar.gz aoc-44973098cbd5079cd782b6b1b00860d39bd2400d.zip |
day 06
Diffstat (limited to 'aoc_2023/day-06/example.test.ts')
-rw-r--r-- | aoc_2023/day-06/example.test.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/aoc_2023/day-06/example.test.ts b/aoc_2023/day-06/example.test.ts new file mode 100644 index 0000000..17dc63d --- /dev/null +++ b/aoc_2023/day-06/example.test.ts @@ -0,0 +1,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); +}); |