24 lines
376 B
TypeScript
24 lines
376 B
TypeScript
|
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);
|
||
|
});
|
||
|
});
|