Join GitHub today
assert: allow circular references #6432
Affected core subsystem(s)
Description of change
assert.deepEqual() and assert.deepStrictEqual() will no longer throw a
referenced this pull request
Apr 27, 2016
It's not difficult to imagine that a test we write might want to compare two objects that contain circular references.
I think it makes sense to fix this bug before we come across that need rather than waiting for it to come up and create problems for the person who is writing that test.
This is a bug fix. If it were a new feature or an API change, the bar would be considerably higher (in my opinion, at least).
Well, most of the times we would be able to argue that features are bug fixes and vice versa.
For example, this patch could also be interpreted as, asserting circular references feature. At the same time, #2315 can be argued as, bug while asserting