Skip to content

Commit d1c6d7a

Browse files
committed
test(cache): strengthen multidimensional array verification
1 parent 5b5ded0 commit d1c6d7a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/cache.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,11 +409,15 @@ describe('TTLCache', () => {
409409
const matrix = [
410410
[1, 2],
411411
[3, 4],
412+
[5, 6],
412413
];
413414

414415
cache.set('matrix', matrix, 60_000);
415416

416-
expect(cache.get('matrix')).toEqual(matrix);
417+
const cached = cache.get('matrix');
418+
419+
expect(cached).toEqual(matrix);
420+
expect(cached?.[2]?.[1]).toBe(6);
417421

418422
cache.destroy();
419423
});

0 commit comments

Comments
 (0)