diff --git a/test/files.js b/test/files.js index 84876cfa..2a1427f0 100644 --- a/test/files.js +++ b/test/files.js @@ -120,13 +120,19 @@ module.exports = (common) => { path: `test-folder/${name}`, content: fs.readFileSync(path.join(base, name)) }) + const emptyDir = (name) => ({ + path: `test-folder/${name}`, + dir: true + }) const dirs = [ content('pp.txt'), content('holmes.txt'), content('jungle.txt'), content('alice.txt'), + emptyDir('empty-folder'), content('files/hello.txt'), content('files/ipfs.txt'), + emptyDir('files/empty') ] ipfs.files.add(dirs, (err, res) => { @@ -134,9 +140,9 @@ module.exports = (common) => { const added = res[res.length - 1] const mh = bs58.encode(added.node.multihash()).toString() - expect(mh).to.equal('QmW2d9LPX4KxpeLDyH3tqYnHrkRMHx8xMQp9cpXEEj2DyR') + expect(mh).to.equal('QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP') expect(added.path).to.equal('test-folder') - expect(added.node.links).to.have.length(5) + expect(added.node.links).to.have.length(6) done() }) })