★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/1b5b1cc08bNouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files
test: add test for strictDeepEqual
PR-URL: #24197
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
  • Loading branch information
nikita-malyschkin authored and MylesBorins committed Dec 26, 2018
1 parent cd2dedf commit 1b5b1cc08b4592ee65c13023a1c84a7bbe8f5510
Showing with 3 additions and 0 deletions.
  1. +3 −0 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);

0 comments on commit 1b5b1cc

Please sign in to comment.