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

Commit

Permalink
feat: factor out mfs tests to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Feb 14, 2018
1 parent 7c2d1b8 commit 91666ca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
File renamed without changes.
8 changes: 1 addition & 7 deletions js/src/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ const through = require('through2')
const path = require('path')
const bl = require('bl')
const isNode = require('detect-node')
const mfs = require('./mfs')

const tests = (common) => {
module.exports = (common) => {
describe('.files', function () {
this.timeout(40 * 1000)

Expand Down Expand Up @@ -983,8 +982,3 @@ const tests = (common) => {
})
})
}

module.exports = (common) => {
tests(common)
mfs(common)
}
12 changes: 8 additions & 4 deletions js/src/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -738,12 +738,13 @@ module.exports = (common) => {
testLink = node1b.links[0]
cb()
})
},
}
/* TODO: revisit this assertions.
(cb) => {
// note: make sure we can link js plain objects
const content = Buffer.from(JSON.stringify({
title: 'serialized object',
}, null, 0));
title: 'serialized object'
}, null, 0))
ipfs.add(content, (err, result) => {
expect(err).to.not.exist()
expect(result).to.exist()
Expand All @@ -766,6 +767,7 @@ module.exports = (common) => {
cb()
})
}
*/
], done)
})

Expand All @@ -779,14 +781,16 @@ module.exports = (common) => {

cb()
})
},
}
/* TODO: revisit this assertions.
(cb) => {
ipfs.object.patch.rmLink(testNodeWithLinkMultihash, testLinkPlainObject, (err, node) => {
expect(err).to.not.exist()
expect(node.multihash).to.not.deep.equal(testNodeWithLinkMultihash)
cb()
})
}
*/
], done)
})

Expand Down

0 comments on commit 91666ca

Please sign in to comment.