From 15b024736307c8d12651cf7ac18435b5e40a0cae Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Sun, 18 Nov 2018 04:15:10 +0100 Subject: [PATCH] test: increase assert test coverage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/24745 Reviewed-By: Anna Henningsen Reviewed-By: Michaƫl Zasso Reviewed-By: Michael Dawson --- test/parallel/test-assert-deep.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/parallel/test-assert-deep.js b/test/parallel/test-assert-deep.js index ddbc5e78eafcaf..a4533977608c00 100644 --- a/test/parallel/test-assert-deep.js +++ b/test/parallel/test-assert-deep.js @@ -949,3 +949,17 @@ assert.deepStrictEqual(obj1, obj2); arr[2 ** 32] = true; assertNotDeepOrStrict(arr, [1, 2, 3]); } + +assert.throws( + () => assert.deepStrictEqual([1, 2, 3], [1, 2]), + { + code: 'ERR_ASSERTION', + name: 'AssertionError [ERR_ASSERTION]', + message: `${defaultMsgStartFull}\n\n` + + ' [\n' + + ' 1,\n' + + ' 2,\n' + + '+ 3\n' + + ' ]' + } +);