Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 44d4803

Browse files
vmxAlan Shaw
authored and
Alan Shaw
committed
fix: add test for dag get with localResolve option (#433)
1 parent 8304495 commit 44d4803

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: js/src/dag/get.js

+8
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,14 @@ module.exports = (createCommon, options) => {
214214
})
215215
})
216216

217+
it('should get only a CID, due to resolving locally only', function (done) {
218+
ipfs.dag.get(cidCbor, 'pb/Data', { localResolve: true }, (err, result) => {
219+
expect(err).to.not.exist()
220+
expect(result.value.equals(cidPb)).to.be.true()
221+
done()
222+
})
223+
})
224+
217225
it('should get a node added as CIDv0 with a CIDv1', done => {
218226
const input = Buffer.from(`TEST${Date.now()}`)
219227

0 commit comments

Comments
 (0)