From 3fb0560539552be38220d2fba4d7cc93a019c0cc Mon Sep 17 00:00:00 2001 From: isam007 Date: Wed, 22 Dec 2021 18:25:34 -0700 Subject: [PATCH] adds one more test to challenge 3.js of js2 to catch Nx0 array errors --- js2/__tests__/3.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js2/__tests__/3.js b/js2/__tests__/3.js index 456b6881e..1dc34675e 100644 --- a/js2/__tests__/3.js +++ b/js2/__tests__/3.js @@ -19,4 +19,8 @@ describe('Generate 2D array', () => { const result = solution(1, 5) expect(result).toEqual([[0, 0, 0, 0, 0]]) }) + it('should generate 3x0 array', () => { + const result = solution(3, 0) + expect(result).toEqual([0],[0],[0]) + }) })