mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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>
This commit is contained in:
1 parent
b16e485910
commit
825f0dda5b
1 file changed
+3
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user