Files
aoc/2024/23/index.test.ts
2024-12-23 13:17:53 +01:00

44 lines
507 B
TypeScript

import { describe, expect, it } from 'bun:test';
import { solveFirst, solveSecond } from './index.ts';
describe('2024-23', () => {
const testInput = `kh-tc
qp-kh
de-cg
ka-co
yn-aq
qp-ub
cg-tb
vc-aq
tb-ka
wh-tc
yn-cg
kh-ub
ta-co
de-co
tc-td
tb-wq
wh-td
ta-ka
td-qp
aq-cg
wq-ub
ub-vc
de-ta
wq-aq
wq-vc
wh-yn
ka-de
kh-ta
co-tc
wh-qp
tb-vc
td-yn`;
it('first', () => {
expect(solveFirst(testInput)).toBe(7);
});
it('second', () => {
expect(solveSecond(testInput)).toBe('co,de,ka,ta');
});
});