2022-12-05 16:16:31 +00:00
|
|
|
import { test, expect, describe } from "vitest";
|
|
|
|
|
|
|
|
import { expectSolution } from "../01/main.js";
|
2022-12-07 23:36:16 +00:00
|
|
|
import { solutionPart1, puzzleInput, sample } from "./part1.js";
|
2022-12-07 23:42:05 +00:00
|
|
|
import part2 from "./part2.js";
|
2022-12-05 16:16:31 +00:00
|
|
|
|
|
|
|
describe("part 1", () => {
|
2022-12-07 23:36:16 +00:00
|
|
|
test("sample", () => {
|
|
|
|
expect(solutionPart1(sample)).toEqual("CMZ");
|
|
|
|
});
|
2022-12-07 23:42:05 +00:00
|
|
|
test("solution", () => {
|
2022-12-05 16:16:31 +00:00
|
|
|
expectSolution(solutionPart1(puzzleInput)).toEqual("VPCDMSLWJ");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("part 2", () => {
|
2022-12-07 23:42:05 +00:00
|
|
|
test("solution", () => {
|
|
|
|
expectSolution(part2(puzzleInput)).toEqual("TPWCGNCCG");
|
2022-12-05 16:16:31 +00:00
|
|
|
});
|
|
|
|
});
|