Skip to content

Commit

Permalink
test: add test for strictDeepEqual
Browse files Browse the repository at this point in the history
PR-URL: #24197
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
  • Loading branch information
nikita-malyschkin authored and addaleax committed Nov 10, 2018
1 parent 0f8d7a6 commit 8793e0d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/parallel/test-util-isDeepStrictEqual.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8793e0d

Please sign in to comment.