[SERVER-40107] assert.eq always returns true for javascript Set objects Created: 13/Mar/19  Updated: 06/Dec/22  Resolved: 13/Mar/19

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ian Boros Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-32665 tojson should print the elements when... Closed
Assigned Teams:
Server Tooling & Methods
Operating System: ALL
Participants:

 Description   

This assertion passes:

assert.eq(new Set([1,2]), new Set([1]))

Looks like it's because if we tojson() a Set we get an empty object:

> tojson(new Set([1,2]))
{ }


Generated at Thu Feb 08 04:54:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.