35 lines
577 B
TypeScript
35 lines
577 B
TypeScript
import { describe, expect, it } from 'bun:test';
|
|
import { solveFirst, solveSecond } from './index.ts';
|
|
|
|
describe('2025-11', () => {
|
|
it('first', () => {
|
|
const testInput = `aaa: you hhh
|
|
you: bbb ccc
|
|
bbb: ddd eee
|
|
ccc: ddd eee fff
|
|
ddd: ggg
|
|
eee: out
|
|
fff: out
|
|
ggg: out
|
|
hhh: ccc fff iii
|
|
iii: out`;
|
|
expect(solveFirst(testInput)).toBe(5);
|
|
});
|
|
it('second', () => {
|
|
const testInput = `svr: aaa bbb
|
|
aaa: fft
|
|
fft: ccc
|
|
bbb: tty
|
|
tty: ccc
|
|
ccc: ddd eee
|
|
ddd: hub
|
|
hub: fff
|
|
eee: dac
|
|
dac: fff
|
|
fff: ggg hhh
|
|
ggg: out
|
|
hhh: out`;
|
|
expect(solveSecond(testInput)).toBe(2);
|
|
});
|
|
});
|