From 825f0dda5b4eb8637457d3cb810a2c8fa3c1ad2b Mon Sep 17 00:00:00 2001 From: Nikita Malyschkin Date: Wed, 7 Nov 2018 10:10:12 +0100 Subject: [PATCH] test: add test for strictDeepEqual PR-URL: https://github.com/nodejs/node/pull/24197 Reviewed-By: Ruben Bridgewater Reviewed-By: Daijiro Wachi --- test/parallel/test-util-isDeepStrictEqual.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/parallel/test-util-isDeepStrictEqual.js b/test/parallel/test-util-isDeepStrictEqual.js index 938781a43084a5..fd585f7ccf0f1e 100644 --- a/test/parallel/test-util-isDeepStrictEqual.js +++ b/test/parallel/test-util-isDeepStrictEqual.js @@ -459,10 +459,13 @@ utilIsDeepStrict(-0, -0); const obj1 = { [symbol1]: 1 }; const obj2 = { [symbol1]: 1 }; const obj3 = { [Symbol()]: 1 }; + const obj4 = { }; // Add a non enumerable symbol as well. It is going to be ignored! Object.defineProperty(obj2, Symbol(), { value: 1 }); + Object.defineProperty(obj4, symbol1, { value: 1 }); notUtilIsDeepStrict(obj1, obj3); utilIsDeepStrict(obj1, obj2); + notUtilIsDeepStrict(obj1, obj4); // TypedArrays have a fast path. Test for this as well. const a = new Uint8Array(4); const b = new Uint8Array(4);