26 lines
655 B
JavaScript
26 lines
655 B
JavaScript
import { test, expect, describe } from "vitest";
|
|
|
|
import { expectSolution } from "../01/main.js";
|
|
import part1, { sample, puzzleInput, unbeaconAtLine } from "./part1.js";
|
|
import part2 from "./part2.js";
|
|
|
|
describe("part 1", () => {
|
|
test('readInput', () => {
|
|
expect(sample[0][0].toArray()).toEqual([2, 18]);
|
|
});
|
|
|
|
test('sample', () => {
|
|
expect(unbeaconAtLine(10)(sample)).toEqual(26);
|
|
});
|
|
|
|
test("solution", () => {
|
|
expectSolution(part1(puzzleInput)).toEqual(5525990);
|
|
});
|
|
});
|
|
|
|
describe("part 2", () => {
|
|
test.todo("solution", () => {
|
|
expectSolution(part2(puzzleInput)).toEqual("TODO");
|
|
});
|
|
});
|