Skip to content

Commit 22b399c

Browse files
committed
Added test coverage for failure case
1 parent 53c97f2 commit 22b399c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

medium/array_min_jumps.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ describe('arrayMinJumps()', () => {
1010
arrayMinJumps([1, 3, 6, 8, 2, 7, 1, 2, 1, 2, 6, 1, 2, 1, 2])
1111
).toBe(4);
1212
});
13+
14+
test('returns -1 if unable to reach end', () => {
15+
expect(arrayMinJumps([1, 0, 0, 0, 3])).toBe(-1);
16+
});
1317
});

0 commit comments

Comments
 (0)