Closed achingbrain closed 3 years ago
Users should not rely on deepEqual in my opinion, as if you create the same PeerId via privateKey, or B58String they are the same PeerId (per PeerId.equals
), but the deep will fail.
Even though, we should address this problem. If this is not a major problem, we should probably wait until we move into using default format from RFC 0001 by default in libp2p
Users should not rely on deepEqual in my opinion
It's a pretty common test assertion which we can't use. It could be fixed my marking using Object.defineProperty
to mark the property as non-enumerable?
This is because
.toString()
has the side effect of setting a._idCIDString
property onthis
which the other peer ID doesn't have.