Closed zackthehuman closed 3 years ago
I need to crunch on this a little bit more. The existing approach can have false positives as long as the same object appears more than once (even when it's not cyclical). I also have to fix the linting errors.
Circling back on this: I think there are many improvements we can make to the serialization outside of handling ref cycles. It would be worth having an issue dedicated to those improvements so that we can figure out what "ideal" serialization looks like.
In the short term, it would help me (and others) to land this fix. I've squashed/rebased my changes, so it should be in a reviewable state. @Krinkle if you have any time would you mind taking a look?
Updating
TapReporter
with the ability to handle objects with circular references. This is needed for proper stringification of actual and expected values that contain cycles.Fixes #104