-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making asCID enumerable brakes assert functions in tests #212
Comments
See also #208 - when decoding |
Turns out that chai Our problems seem to be coming from https://www.npmjs.com/package/chai-subset package which does not do any memoization and consequently it fails with stack overflow. And we have to to use chai-subset because chai I think our our options are to either:
|
As per #212 making `asCID` enumerable breaks tests where modules don't handle self-referential data properly. As proposed in #213 this swaps `cid.CID === cid` for `cid['/'] === cid.bytes` as a mechanism to tell consumers that the object in question is a `CID` which lets them write CBOR with the correct tags, for example. Fixes #212 Closes #213
As per #212 making `asCID` enumerable breaks tests where modules don't handle self-referential data properly. As proposed in #213 this swaps `cid.CID === cid` for `cid['/'] === cid.bytes` as a mechanism to tell consumers that the object in question is a `CID` which lets them write CBOR with the correct tags, for example. Fixes #212 Closes #213
## [10.0.2](v10.0.1...v10.0.2) (2022-10-19) ### Bug Fixes * use slash as flag that an object is a CID ([#217](#217)) ([1cec619](1cec619)), closes [#212](#212) [#213](#213) ### Trivial Changes * **no-release:** rename varint test file so it is run ([#209](#209)) ([e32fe47](e32fe47)) * remove unnecessary dev deps ([#218](#218)) ([a43ffff](a43ffff))
🎉 This issue has been resolved in version 10.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
After updating to v10 lot of our tests started fail, as it turns out problem is introduced by a
asCID
property becoming enumerable. Most assert functions seem to get tripped onlink.asCID
field either crashing with stack overflow or simply deciding cids aren't equal 😭I'm not sure what the fix is here, but it's kind of a pain to deal with now.
The text was updated successfully, but these errors were encountered: