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

Commit d49f17e

Browse files
committed
test: add dag.put preload test
License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io>
1 parent 787d1dd commit d49f17e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/core/preload.spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,4 +192,12 @@ describe('preload', () => {
192192
MockPreloadNode.waitForCids(block.cid.toBaseEncodedString(), done)
193193
})
194194
})
195+
196+
it('should preload content added with dag.put', (done) => {
197+
const obj = { test: hat() }
198+
ipfs.dag.put(obj, { format: 'dag-cbor', hashAlg: 'sha2-256' }, (err, cid) => {
199+
expect(err).to.not.exist()
200+
MockPreloadNode.waitForCids(cid.toBaseEncodedString(), done)
201+
})
202+
})
195203
})

0 commit comments

Comments
 (0)