advent-of-code-2023/src/day_ten.test.ts

24 lines
376 B
TypeScript
Raw Normal View History

2023-12-16 10:27:51 +00:00
import {getFurthestDistance} from "./day_ten";
describe('Day Ten', () => {
it.each([
[`.....
.S-7.
.|.|.
.L-J.
.....`, 4], [
`-L|F7
7S-7|
L|7||
-L-J|
L|-JF`, 4],
[`..F7.
.FJ|.
SJ.L7
|F--J
LJ...`, 8]
])('should calculate the number of steps to the exit', (input, expected) => {
const result = getFurthestDistance(input);
expect(result).toEqual(expected);
});
});