What version of Bun is running?
1.3.11-canary.1+9e93bfa1b
What platform is your computer?
Linux 5.10.0-12-amd64 x86_64 x86_64
What steps can reproduce the bug?
Hi,
I would like to report a behavior in Bun that can be reproduced using the below snippet
const assert = require('assert');
assert.deepEqual(
new Set([{ a: 1 }, { a: 1 }]),
new Set([{ a: 1 }, { a: 2 }])
);
assert.deepStrictEqual(
new Set([{ a: 1 }, { a: 1 }]),
new Set([{ a: 1 }, { a: 2 }])
);```
### What is the expected behavior?
root@KContainer:~/13347# node repro.cjs
Running deepEqual on Sets...
node:assert:152
throw new AssertionError(obj);
^
AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal:
Set(2) {
{
a: 1
},
{
a: 1
}
}
should loosely deep-equal
Set(2) {
{
a: 1
},
{
a: 2
}
}
at Object. (/13347/repro.cjs:7:8)
at Module._compile (node:internal/modules/cjs/loader:1804:14)
at Object..js (node:internal/modules/cjs/loader:1936:10)
at Module.load (node:internal/modules/cjs/loader:1525:32)
at Module._load (node:internal/modules/cjs/loader:1327:12)
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:245:24)
at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
at node:internal/main/run_main_module:33:47 {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: Set(2) { { a: 1 }, { a: 1 } },
expected: Set(2) { { a: 1 }, { a: 2 } },
operator: 'deepEqual',
diff: 'simple'
}
Node.js v24.13.1
### What do you see instead?
root@KContainer:~/13347# bun run repro.cjs
Running deepEqual on Sets...
deepEqual did not throw
Running deepStrictEqual on Sets...
deepStrictEqual did not throw
Both assertions completed without error.
### Additional information
_No response_
What version of Bun is running?
1.3.11-canary.1+9e93bfa1b
What platform is your computer?
Linux 5.10.0-12-amd64 x86_64 x86_64
What steps can reproduce the bug?
Hi,
I would like to report a behavior in Bun that can be reproduced using the below snippet
root@KContainer:~/13347# node repro.cjs
Running deepEqual on Sets...
node:assert:152
throw new AssertionError(obj);
^
AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal:
Set(2) {
{
a: 1
},
{
a: 1
}
}
should loosely deep-equal
Set(2) {
{
a: 1
},
{
a: 2
}
}
at Object. (/13347/repro.cjs:7:8)
at Module._compile (node:internal/modules/cjs/loader:1804:14)
at Object..js (node:internal/modules/cjs/loader:1936:10)
at Module.load (node:internal/modules/cjs/loader:1525:32)
at Module._load (node:internal/modules/cjs/loader:1327:12)
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:245:24)
at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
at node:internal/main/run_main_module:33:47 {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: Set(2) { { a: 1 }, { a: 1 } },
expected: Set(2) { { a: 1 }, { a: 2 } },
operator: 'deepEqual',
diff: 'simple'
}
Node.js v24.13.1
root@KContainer:~/13347# bun run repro.cjs
Running deepEqual on Sets...
deepEqual did not throw
Running deepStrictEqual on Sets...
deepStrictEqual did not throw
Both assertions completed without error.