We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 384e74c commit 1c242ccCopy full SHA for 1c242cc
test/test-cid.spec.js
@@ -696,4 +696,12 @@ describe('CID', () => {
696
const encoded = varint.encodeTo(2, new Uint8Array(32))
697
assert.throws(() => CID.decode(encoded), 'Invalid CID version 2')
698
})
699
+
700
+ it('asCID is non-enumerable', () => {
701
+ const cid = CID.parse('bafybeif2pall7dybz7vecqka3zo24irdwabwdi4wc55jznaq75q7eaavvu')
702
703
+ assert.isFalse(Object.prototype.propertyIsEnumerable.call(cid, 'asCID'))
704
+ assert.isFalse(Object.keys(cid).includes('asCID'))
705
+ assert.equal(cid.asCID, cid)
706
+ })
707
0 commit comments