summaryrefslogtreecommitdiff
path: root/aoc_2023/day-03/example.test.ts
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-12-02 22:41:44 -0700
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-12-02 22:41:44 -0700
commitc97078c1dc2d245d829294ff700b2e2cbcbbf3fe (patch)
treeb2fbfde283165a33040d65ffc42a080b23b2300c /aoc_2023/day-03/example.test.ts
parentcfd970e21663c3278f6e01d356690789225b6b56 (diff)
downloadaoc-c97078c1dc2d245d829294ff700b2e2cbcbbf3fe.tar.gz
aoc-c97078c1dc2d245d829294ff700b2e2cbcbbf3fe.zip
day 3 jesus
Diffstat (limited to 'aoc_2023/day-03/example.test.ts')
-rw-r--r--aoc_2023/day-03/example.test.ts26
1 files changed, 26 insertions, 0 deletions
diff --git a/aoc_2023/day-03/example.test.ts b/aoc_2023/day-03/example.test.ts
new file mode 100644
index 0000000..1a654c1
--- /dev/null
+++ b/aoc_2023/day-03/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 = `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);
+});