Skip to content

Commit

Permalink
fix: add test for dag get with localResolve option (ipfs#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmx authored and Alan Shaw committed Jan 25, 2019
1 parent 8304495 commit 44d4803
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions js/src/dag/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,14 @@ module.exports = (createCommon, options) => {
})
})

it('should get only a CID, due to resolving locally only', function (done) {
ipfs.dag.get(cidCbor, 'pb/Data', { localResolve: true }, (err, result) => {
expect(err).to.not.exist()
expect(result.value.equals(cidPb)).to.be.true()
done()
})
})

it('should get a node added as CIDv0 with a CIDv1', done => {
const input = Buffer.from(`TEST${Date.now()}`)

Expand Down

0 comments on commit 44d4803

Please sign in to comment.