Skip to content

Commit 4c3d84d

Browse files
dirkmcAlan Shaw
authored and
Alan Shaw
committed
revert: add test for Object.links with CBOR (ipfs#465)
This reverts commit ba4f788978d5a2767ff5c41272541ee6be8b2d2e.
1 parent d9052c2 commit 4c3d84d

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

src/object/links.js

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -162,42 +162,5 @@ module.exports = (createCommon, options) => {
162162
})
163163
})
164164
})
165-
166-
it('should get links from CBOR object', (done) => {
167-
const hashes = []
168-
ipfs.add(Buffer.from('test data'), (err, res1) => {
169-
expect(err).to.not.exist()
170-
hashes.push(res1[0].hash)
171-
ipfs.add(Buffer.from('more test data'), (err, res2) => {
172-
hashes.push(res2[0].hash)
173-
expect(err).to.not.exist()
174-
const obj = {
175-
some: 'data',
176-
mylink: { '/': hashes[0] },
177-
myobj: {
178-
anotherLink: { '/': hashes[1] }
179-
}
180-
}
181-
ipfs.dag.put(obj, (err, cid) => {
182-
expect(err).to.not.exist()
183-
ipfs.object.links(cid, (err, links) => {
184-
expect(err).to.not.exist()
185-
expect(links.length).to.eql(2)
186-
187-
// TODO: js-ipfs succeeds but go returns empty strings for link name
188-
// const names = [links[0].name, links[1].name]
189-
// expect(names).includes('mylink')
190-
// expect(names).includes('myobj/anotherLink')
191-
192-
const cids = [links[0].cid.toString(), links[1].cid.toString()]
193-
expect(cids).includes(hashes[0])
194-
expect(cids).includes(hashes[1])
195-
196-
done()
197-
})
198-
})
199-
})
200-
})
201-
})
202165
})
203166
}

0 commit comments

Comments
 (0)