diff --git a/src/exporter/file.js b/src/exporter/file.js index 3329d122..6b9e4397 100644 --- a/src/exporter/file.js +++ b/src/exporter/file.js @@ -40,6 +40,7 @@ module.exports = (node, name, pathRest, ipldResolver) => { return pull.values([{ content: content, path: name, + hash: node.multihash, size: file.fileSize() }]) } diff --git a/test/test-exporter.js b/test/test-exporter.js index 633cba41..81582470 100644 --- a/test/test-exporter.js +++ b/test/test-exporter.js @@ -45,8 +45,8 @@ module.exports = (repo) => { function onFiles (err, files) { expect(err).to.not.exist() expect(files).to.have.length(1) + expect(files[0]).to.have.property('hash') expect(files[0]).to.have.property('path', hash) - fileEql(files[0], unmarsh.data, done) } }) @@ -117,6 +117,7 @@ module.exports = (repo) => { pull( exporter(hash, ipldResolver), pull.collect((err, files) => { + files.forEach(file => expect(file).to.have.property('hash')) expect(err).to.not.exist() expect(