Skip to content

Commit

Permalink
Update test/parallel/test-assert-objects.js
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
2 people authored and nodejs-github-bot committed Jun 16, 2024
1 parent cce5b7b commit 6921e96
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/parallel/test-assert-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,13 @@ describe('Object Comparison Tests', function() {
const set2 = new Set(['value1', 'value3']);
assert.throws(() => assert.matchObjectStrict(set1, set2), Error);
});

it('should compare plain objects from different realms', function() {
assert.matchObjectStrict(
vm.runInNewContext('({ a: 1, b: 2n, c: "3", d: /4/, e: new Set([5]), f: [6], g: new Uint8Array })'),
{ b: 2n, e: new Set([5]), f: [6], g: new Uint8Array() }
);
});

it('should strictly compare two objects with identical getter/setter properties', function() {
const createObjectWithGetterSetter = () => {
Expand Down

0 comments on commit 6921e96

Please sign in to comment.