Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
test: add dag.put preload test
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
  • Loading branch information
alanshaw committed Jul 27, 2018
1 parent 787d1dd commit d49f17e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/core/preload.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,12 @@ describe('preload', () => {
MockPreloadNode.waitForCids(block.cid.toBaseEncodedString(), done)
})
})

it('should preload content added with dag.put', (done) => {
const obj = { test: hat() }
ipfs.dag.put(obj, { format: 'dag-cbor', hashAlg: 'sha2-256' }, (err, cid) => {
expect(err).to.not.exist()
MockPreloadNode.waitForCids(cid.toBaseEncodedString(), done)
})
})
})

0 comments on commit d49f17e

Please sign in to comment.