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

Commit 6500103

Browse files
committed
test: fix tests
1 parent dd4aaa5 commit 6500103

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/core/components/init-assets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ module.exports = function addDefaultAssets (self, log, callback) {
3535
importer(self._ipldResolver),
3636
pull.through((el) => {
3737
if (el.path === 'files/init-docs/docs') {
38-
// const hash = mh.toB58String(el.multihash)
3938
log('to get started, enter:')
4039
log()
4140
log(`\t jsipfs files cat /ipfs/QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB`)
4241
// TODO when we support pathing in unixfs-engine
42+
// const hash = mh.toB58String(el.multihash)
4343
// log(`\t jsipfs files cat /ipfs/${hash}/readme`)
4444
log()
4545
}

src/core/components/init.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ module.exports = function init (self) {
5959
]
6060

6161
if (typeof addDefaultAssets === 'function') {
62+
console.log('init assets')
63+
6264
tasks.push((cb) => addDefaultAssets(self, opts.log, cb))
6365
}
6466

test/core/init.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ describe('init', () => {
6868
it('init docs are written', (done) => {
6969
ipfs.init({ bits: 1024 }, (err) => {
7070
expect(err).to.not.exist()
71-
const multihash = new Buffer('12205e7c3ce237f936c76faf625e90f7751a9f5eeb048f59873303c215e9cce87599', 'hex')
71+
const multihash = 'QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB'
7272

73-
ipfs.object.get(multihash, {}, (err, node) => {
73+
ipfs.object.get(multihash, { enc: 'base58' }, (err, node) => {
7474
expect(err).to.not.exist()
7575
expect(node.links).to.exist()
7676
done()

0 commit comments

Comments
 (0)