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

test: backport of ipfs/interface-ipfs-core#314 #315

Merged
merged 1 commit into from
Jun 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions js/src/dag.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,6 @@ module.exports = (common) => {
}, done)
})

// This works because dag-cbor will just treat pbNode as a regular object
it.skip('dag-pb node with wrong multicodec', (done) => {
ipfs.dag.put(pbNode, 'dag-cbor', 'sha3-512', (err) => {
expect(err).to.exist()
done()
})
})

it('dag-cbor with default hash func (sha2-256)', (done) => {
ipfs.dag.put(cborNode, {
format: 'dag-cbor',
Expand All @@ -93,22 +85,6 @@ module.exports = (common) => {
}, done)
})

it('dag-cbor node with wrong multicodec', function (done) {
// This works in go-ipfs because dag-pb will serialize any object. If
// the object has neither a `data` nor `links` field it's serialized
// as an empty object
if (withGo) {
this.skip()
}
ipfs.dag.put(cborNode, {
format: 'dag-pb',
hashAlg: 'sha3-512'
}, (err) => {
expect(err).to.exist()
done()
})
})

it('returns the cid', (done) => {
ipfs.dag.put(cborNode, {
format: 'dag-cbor',
Expand Down