diff options
author | Lizzy Hunt <lizzy.hunt@usu.edu> | 2023-12-01 16:05:44 -0700 |
---|---|---|
committer | Lizzy Hunt <lizzy.hunt@usu.edu> | 2023-12-01 16:05:44 -0700 |
commit | 888cd821acc7582255320e0ddbddd2495e505cd4 (patch) | |
tree | 430ee27e7ee7476be5db930c0a93f61c60934c46 /aoc_2021/day-01/example.test.ts | |
parent | cdb12dbc28cc441745bad55e384494bc8942586a (diff) | |
download | aoc-888cd821acc7582255320e0ddbddd2495e505cd4.tar.gz aoc-888cd821acc7582255320e0ddbddd2495e505cd4.zip |
updates and test w/ day 01 2021
Diffstat (limited to 'aoc_2021/day-01/example.test.ts')
-rw-r--r-- | aoc_2021/day-01/example.test.ts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/aoc_2021/day-01/example.test.ts b/aoc_2021/day-01/example.test.ts new file mode 100644 index 0000000..329dd72 --- /dev/null +++ b/aoc_2021/day-01/example.test.ts @@ -0,0 +1,26 @@ +import { expect, test } from "bun:test"; +import { main as part1 } from "./part_1"; +import { main as part2 } from "./part_2"; + +const example = `199 +200 +208 +210 +200 +207 +240 +269 +260 +263`.split("\n"); + +test("part1", async () => { + const answer = 7; + const res = await part1(example); + expect(res).toEqual(answer); +}); + +test("part2", async () => { + const answer = 5; + const res = await part2(example); + expect(res).toEqual(answer); +}); |