21 lines
536 B
JavaScript
21 lines
536 B
JavaScript
import { test, expect, describe } from "vitest";
|
|
|
|
import { expectSolution } from "../01/main.js";
|
|
import { solutionPart1, puzzleInput, sample } from "./part1.js";
|
|
import part2 from "./part2.js";
|
|
|
|
describe("part 1", () => {
|
|
test("sample", () => {
|
|
expect(solutionPart1(sample)).toEqual("CMZ");
|
|
});
|
|
test("solution", () => {
|
|
expectSolution(solutionPart1(puzzleInput)).toEqual("VPCDMSLWJ");
|
|
});
|
|
});
|
|
|
|
describe("part 2", () => {
|
|
test("solution", () => {
|
|
expectSolution(part2(puzzleInput)).toEqual("TPWCGNCCG");
|
|
});
|
|
});
|