diff --git a/src/files-regular/add-readable-stream.js b/src/files-regular/add-readable-stream.js index b91f13da..29187548 100644 --- a/src/files-regular/add-readable-stream.js +++ b/src/files-regular/add-readable-stream.js @@ -59,10 +59,11 @@ module.exports = (createCommon, options) => { stream.on('data', (file) => { if (file.path === 'test-folder') { expect(file.hash).to.equal(fixtures.directory.cid) - done() } }) + stream.on('end', done) + files.forEach((file) => stream.write(file)) stream.end() }) diff --git a/src/files-regular/ls-pull-stream.js b/src/files-regular/ls-pull-stream.js index 3ba93b1e..db33cdb1 100644 --- a/src/files-regular/ls-pull-stream.js +++ b/src/files-regular/ls-pull-stream.js @@ -70,37 +70,37 @@ module.exports = (createCommon, options) => { { depth: 1, name: 'alice.txt', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/alice.txt', - size: 11696, + size: 11685, hash: 'QmZyUEQVuRK3XV7L9Dk26pg6RVSgaYkiSTEdnT2kZZdwoi', type: 'file' }, { depth: 1, name: 'empty-folder', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/empty-folder', - size: 4, + size: 0, hash: 'QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn', type: 'dir' }, { depth: 1, name: 'files', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/files', - size: 183, + size: 0, hash: 'QmZ25UfTqXGz9RsEJFg7HUAuBcmfx5dQZDXQd2QEZ8Kj74', type: 'dir' }, { depth: 1, name: 'holmes.txt', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/holmes.txt', - size: 582072, + size: 581878, hash: 'QmR4nFjTu18TyANgC65ArNWp5Yaab1gPzQ4D8zp7Kx3vhr', type: 'file' }, { depth: 1, name: 'jungle.txt', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/jungle.txt', - size: 2305, + size: 2294, hash: 'QmT6orWioMiSqXXPGsUi71CKRRUmJ8YkuueV2DPV34E9y9', type: 'file' }, { depth: 1, name: 'pp.txt', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/pp.txt', - size: 4551, + size: 4540, hash: 'QmVwdDCY4SPGVFnNCiZnX5CtzwWDn6kAM98JXzKxE3kCmn', type: 'file' } ]) diff --git a/src/files-regular/ls-readable-stream.js b/src/files-regular/ls-readable-stream.js index a5a7b766..9d9e973b 100644 --- a/src/files-regular/ls-readable-stream.js +++ b/src/files-regular/ls-readable-stream.js @@ -66,37 +66,37 @@ module.exports = (createCommon, options) => { { depth: 1, name: 'alice.txt', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/alice.txt', - size: 11696, + size: 11685, hash: 'QmZyUEQVuRK3XV7L9Dk26pg6RVSgaYkiSTEdnT2kZZdwoi', type: 'file' }, { depth: 1, name: 'empty-folder', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/empty-folder', - size: 4, + size: 0, hash: 'QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn', type: 'dir' }, { depth: 1, name: 'files', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/files', - size: 183, + size: 0, hash: 'QmZ25UfTqXGz9RsEJFg7HUAuBcmfx5dQZDXQd2QEZ8Kj74', type: 'dir' }, { depth: 1, name: 'holmes.txt', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/holmes.txt', - size: 582072, + size: 581878, hash: 'QmR4nFjTu18TyANgC65ArNWp5Yaab1gPzQ4D8zp7Kx3vhr', type: 'file' }, { depth: 1, name: 'jungle.txt', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/jungle.txt', - size: 2305, + size: 2294, hash: 'QmT6orWioMiSqXXPGsUi71CKRRUmJ8YkuueV2DPV34E9y9', type: 'file' }, { depth: 1, name: 'pp.txt', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/pp.txt', - size: 4551, + size: 4540, hash: 'QmVwdDCY4SPGVFnNCiZnX5CtzwWDn6kAM98JXzKxE3kCmn', type: 'file' } ]) diff --git a/src/files-regular/ls.js b/src/files-regular/ls.js index bab3544c..8397d34b 100644 --- a/src/files-regular/ls.js +++ b/src/files-regular/ls.js @@ -69,37 +69,37 @@ module.exports = (createCommon, options) => { { depth: 1, name: 'alice.txt', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/alice.txt', - size: 11696, + size: 11685, hash: 'QmZyUEQVuRK3XV7L9Dk26pg6RVSgaYkiSTEdnT2kZZdwoi', type: 'file' }, { depth: 1, name: 'empty-folder', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/empty-folder', - size: 4, + size: 0, hash: 'QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn', type: 'dir' }, { depth: 1, name: 'files', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/files', - size: 183, + size: 0, hash: 'QmZ25UfTqXGz9RsEJFg7HUAuBcmfx5dQZDXQd2QEZ8Kj74', type: 'dir' }, { depth: 1, name: 'holmes.txt', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/holmes.txt', - size: 582072, + size: 581878, hash: 'QmR4nFjTu18TyANgC65ArNWp5Yaab1gPzQ4D8zp7Kx3vhr', type: 'file' }, { depth: 1, name: 'jungle.txt', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/jungle.txt', - size: 2305, + size: 2294, hash: 'QmT6orWioMiSqXXPGsUi71CKRRUmJ8YkuueV2DPV34E9y9', type: 'file' }, { depth: 1, name: 'pp.txt', path: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/pp.txt', - size: 4551, + size: 4540, hash: 'QmVwdDCY4SPGVFnNCiZnX5CtzwWDn6kAM98JXzKxE3kCmn', type: 'file' } ])