Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
test: improve code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
richardschneider committed Jun 24, 2018
1 parent d56d7cb commit 081daf5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/util.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,17 @@ describe('IPLD format util API cid()', () => {
done)
})
})

it('should encode the CID correctly and ignore undefined options', (done) => {
IpldBitcoin.util.deserialize(fixtureBlock, (err, dagNode) => {
expect(err).to.not.exist()
verifyCid1(
dagNode,
undefined,
'56203ec2c691d447b2fd0d6a94742345af1f351037dab1ab9e900200000000000000',
done)
})
})
})

const verifyBlock = (dagNode, expected) => {
Expand Down

0 comments on commit 081daf5

Please sign in to comment.