Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Mar 21, 2017
1 parent dd4aaa5 commit 6500103
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/components/init-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ module.exports = function addDefaultAssets (self, log, callback) {
importer(self._ipldResolver),
pull.through((el) => {
if (el.path === 'files/init-docs/docs') {
// const hash = mh.toB58String(el.multihash)
log('to get started, enter:')
log()
log(`\t jsipfs files cat /ipfs/QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB`)
// TODO when we support pathing in unixfs-engine
// const hash = mh.toB58String(el.multihash)
// log(`\t jsipfs files cat /ipfs/${hash}/readme`)
log()
}
Expand Down
2 changes: 2 additions & 0 deletions src/core/components/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ module.exports = function init (self) {
]

if (typeof addDefaultAssets === 'function') {
console.log('init assets')

tasks.push((cb) => addDefaultAssets(self, opts.log, cb))
}

Expand Down
4 changes: 2 additions & 2 deletions test/core/init.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ describe('init', () => {
it('init docs are written', (done) => {
ipfs.init({ bits: 1024 }, (err) => {
expect(err).to.not.exist()
const multihash = new Buffer('12205e7c3ce237f936c76faf625e90f7751a9f5eeb048f59873303c215e9cce87599', 'hex')
const multihash = 'QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB'

ipfs.object.get(multihash, {}, (err, node) => {
ipfs.object.get(multihash, { enc: 'base58' }, (err, node) => {
expect(err).to.not.exist()
expect(node.links).to.exist()
done()
Expand Down

0 comments on commit 6500103

Please sign in to comment.