This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(dag): add test to verify put API overrides hash algorithm (#323)
As discussed in ipfs/js-ipfs#1419 (comment) at the time of this commit, `dag.put()` basically ignores the `hashAlg` option, as it passes it down to `ipld.put()`, which won't honor it until ipld/js-ipld#133 is merged. Once ipld/js-ipld#133 is merged, this test verifies that e.g. ``` dag.put(cborNode, { format: 'dag-cbor', hashAlg: 'sha3-512' }, (err, cid) => { ... }) ``` Actually results in a `CID` instance that decodes to `sha3-512` and not the `sha2-256` default. License: MIT Signed-off-by: Pascal Precht [email protected]
- Loading branch information