Files
aoc/2024/05/index.test.ts
2024-12-05 11:16:04 +01:00

40 lines
512 B
TypeScript

import { describe, expect, it } from 'bun:test';
import { solveFirst, solveSecond } from './index.ts';
describe('2024-05', () => {
const testInput = `47|53
97|13
97|61
97|47
75|29
61|13
75|53
29|13
97|29
53|29
61|53
97|53
61|29
47|13
75|47
97|75
47|61
75|61
47|29
75|13
53|13
75,47,61,53,29
97,61,53,29,13
75,29,13
75,97,47,61,53
61,13,29
97,13,75,29,47`;
it('first', () => {
expect(solveFirst(testInput)).toBe(143);
});
it('second', () => {
expect(solveSecond(testInput)).toBe(123);
});
});