23 lines
430 B
TypeScript
23 lines
430 B
TypeScript
|
import { Engine } from "./day_three";
|
||
|
|
||
|
const schematic = `467..114..
|
||
|
...*......
|
||
|
..35..633.
|
||
|
......#...
|
||
|
617*......
|
||
|
.....+.58.
|
||
|
..592.....
|
||
|
......755.
|
||
|
...$.*....
|
||
|
.664.598..`;
|
||
|
|
||
|
|
||
|
// const schematic = `.....+.58.
|
||
|
// ..592.....`;
|
||
|
|
||
|
describe('Day Three', () => {
|
||
|
it('should calculate the sum of all part numbers', () => {
|
||
|
const engine = Engine.create(schematic);
|
||
|
expect(engine.sumPartNumbers()).toEqual(4361);
|
||
|
});
|
||
|
});
|