diff options
author | Nikita Malyschkin <nikita.malyschkin@gmail.com> | 2018-11-07 10:10:12 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-11-10 17:10:01 +0100 |
commit | 8793e0de1d93c2d6bb8a859325982ebcfb94d6c6 (patch) | |
tree | ba9224c2b350a58b6e3841bf9513dbae8f5e8913 /test/parallel/test-util-isDeepStrictEqual.js | |
parent | 0f8d7a684f1a4885f14b5b5e1c5f675e2738712c (diff) | |
download | android-node-v8-8793e0de1d93c2d6bb8a859325982ebcfb94d6c6.tar.gz android-node-v8-8793e0de1d93c2d6bb8a859325982ebcfb94d6c6.tar.bz2 android-node-v8-8793e0de1d93c2d6bb8a859325982ebcfb94d6c6.zip |
test: add test for strictDeepEqual
PR-URL: https://github.com/nodejs/node/pull/24197
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Diffstat (limited to 'test/parallel/test-util-isDeepStrictEqual.js')
-rw-r--r-- | test/parallel/test-util-isDeepStrictEqual.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/parallel/test-util-isDeepStrictEqual.js b/test/parallel/test-util-isDeepStrictEqual.js index 938781a430..fd585f7ccf 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); |