chai
chai copied to clipboard
Mongoose v6 ObjectId deepEqual always true
Hi. We did pay attention in our tests that we cannot rely anymore on deep.equal
when comparing objects with ObjectId() or even ObjectIds itself.
Env: node v16 Mongoose version: v5 vs v6
For the mongoose v5 tests work as expected.
{
"dependencies": {
"chai": "^4.3.6",
"mocha": "^10.0.0",
"mongoose": "^5.0.0"
}
}
For mongoose v6 tests are passing when they should fail.
{
"dependencies": {
"chai": "^4.3.6",
"mocha": "^10.0.0",
"mongoose": "^6.0.0"
}
}
I did prepare a repo for reproducing the issue: https://github.com/spaiz/objectId_tests
I assume this PR should fix it :/
https://github.com/chaijs/deep-eql/pull/86
hi any news on this?