Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
assert.deepEqual() does not stop on circular references #207
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
I had the same problem in my test suite. I edited node.js to fix the problem : http://github.com/strager/node/commit/56dbd80eb883641e0fa734bd9f91be5d680feb54
@akidee, I think this would cause problems. I prefer a "hands-off" approach; don't touch the object, but just examine it. If you can do some performance analysis and it proves your method to be significantly faster or my method to be very flawed, we could reconsider, but I prefer correctness and fool-proof-ness over performance when writing test cases. (I REALLY don't want bugs or gatcha's in the assertion framework I'm using!)