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

WIP: support the new unixfs-engine balanced builder #106

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 6 additions & 6 deletions src/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = (common) => {
describe('.add', () => {
it('stream', (done) => {
const buffered = new Buffer('some data')
const expectedMultihash = 'QmVv4Wz46JaZJeH5PMV4LGbRiiMKEmszPYY3g6fjGnVXBS'
const expectedMultihash = 'QmQymZionCot18LL6AG6b4nTyP7bEudr7SywcKB7gPyJmY'

const rs = new Readable()
rs.push(buffered)
Expand All @@ -72,7 +72,7 @@ module.exports = (common) => {
const file = res[0]
expect(file).to.exist
expect(file.path).to.equal('data.txt')
expect(file.size).to.equal(17)
expect(file.size).to.equal(67)
expect(file.hash).to.equal(expectedMultihash)
done()
})
Expand All @@ -83,7 +83,7 @@ module.exports = (common) => {
path: 'testfile.txt',
content: smallFile
}
const expectedMultihash = 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP'
const expectedMultihash = 'QmdPe8QN3SUMcYjiqvTTcZQ6DNfkxjB2dkoAJktyik5R9C'

ipfs.files.add([file], (err, res) => {
expect(err).to.not.exist
Expand All @@ -96,7 +96,7 @@ module.exports = (common) => {
})

it('buffer', (done) => {
const expectedMultihash = 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP'
const expectedMultihash = 'QmdPe8QN3SUMcYjiqvTTcZQ6DNfkxjB2dkoAJktyik5R9C'

ipfs.files.add(smallFile, (err, res) => {
expect(err).to.not.exist
Expand Down Expand Up @@ -167,7 +167,7 @@ module.exports = (common) => {
path: `test-folder/${name}`
})

const expectedRootMultihash = 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP'
const expectedRootMultihash = 'QmcVyBeMQzcHQbG1DtspQ1GikrDg9bGJcGuzyZFVMnUEAu'

const files = [
content('pp.txt'),
Expand Down Expand Up @@ -242,7 +242,7 @@ module.exports = (common) => {

describe('promise API', () => {
describe('.add', () => {
const expectedMultihash = 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP'
const expectedMultihash = 'QmdPe8QN3SUMcYjiqvTTcZQ6DNfkxjB2dkoAJktyik5R9C'

it('buffer', () => {
return ipfs.files.add(smallFile)
Expand Down