Solve 2024-22

This commit is contained in:
2024-12-22 14:54:10 +01:00
parent 4654e84d37
commit fd01ee545e
6 changed files with 142 additions and 4 deletions
+7 -3
View File
@@ -21,8 +21,12 @@ describe('2024-20', () => {
expect(solveFirst(testInput, 1)).toBe(14 + 14 + 2 + 4 + 2 + 3 + 5);
});
it('second', () => {
expect(solveSecond(testInput, 50)).toBe(
32 + 31 + 29 + 39 + 25 + 23 + 20 + 19 + 12 + 14 + 12 + 22 + 4 + 3
);
// it takes too long
// so only run while `NODE_ENV=production bun test --coverage`
if (process.env.NODE_ENV === 'production') {
expect(solveSecond(testInput, 50)).toBe(
32 + 31 + 29 + 39 + 25 + 23 + 20 + 19 + 12 + 14 + 12 + 22 + 4 + 3
);
}
});
});