test(dag): add test to verify put API overrides hash algorithm (#323)
test(dag): add test to verify put API overrides hash algorithm (#323)

As discussed in https://github.com/ipfs/js-ipfs/pull/1419#issuecomment-402441180
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
https://github.com/ipld/js-ipld/pull/133 is merged.

Once https://github.com/ipld/js-ipld/pull/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: 22158f1a4da591a479569ed08bfba61c75ed615f@gmail.com
ipfs/interface-ipfs-core