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

Commit ed6c532

Browse files
fix code review
1 parent 5c38bf2 commit ed6c532

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

test/interface-ipfs-core/ls.spec.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('ls', function () {
1515

1616
let ipfs
1717
let fc
18-
let folderHash
18+
let folder
1919

2020
before(function (done) {
2121
this.timeout(20 * 1000) // slow CI
@@ -28,7 +28,8 @@ describe('ls', function () {
2828
ipfs.util.addFromFs(filesPath, { recursive: true }, cb)
2929
},
3030
(hashes, cb) => {
31-
folderHash = hashes[hashes.length - 1].hash
31+
folder = hashes[hashes.length - 1].hash
32+
expect(folder).to.be.eql('QmRNjDeKStKGTQXnJ2NFqeQ9oW23WcpbmvCVrpDHgDg3T6')
3233
cb()
3334
}
3435
], done)
@@ -39,12 +40,12 @@ describe('ls', function () {
3940
})
4041

4142
it('should correctly retrieve links', function (done) {
42-
ipfs.ls(folderHash, (err, res) => {
43+
ipfs.ls(folder, (err, res) => {
4344
expect(err).to.not.exist
4445

4546
expect(res).to.have.a.property('Objects')
4647
expect(res.Objects[0]).to.have.a.property('Links')
47-
expect(res.Objects[0]).to.have.property('Hash')
48+
expect(res.Objects[0]).to.have.property('Hash', 'QmRNjDeKStKGTQXnJ2NFqeQ9oW23WcpbmvCVrpDHgDg3T6')
4849
done()
4950
})
5051
})
@@ -67,11 +68,11 @@ describe('ls', function () {
6768

6869
describe('promise', () => {
6970
it('should correctly retrieve links', () => {
70-
return ipfs.ls(folderHash)
71+
return ipfs.ls(folder)
7172
.then((res) => {
7273
expect(res).to.have.a.property('Objects')
7374
expect(res.Objects[0]).to.have.a.property('Links')
74-
expect(res.Objects[0]).to.have.property('Hash')
75+
expect(res.Objects[0]).to.have.property('Hash', 'QmRNjDeKStKGTQXnJ2NFqeQ9oW23WcpbmvCVrpDHgDg3T6')
7576
})
7677
})
7778

test/interface-ipfs-core/refs.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ describe('.refs', () => {
2828
},
2929
(hashes, cb) => {
3030
folder = hashes[hashes.length - 1].hash
31+
expect(folder).to.be.eql('QmRNjDeKStKGTQXnJ2NFqeQ9oW23WcpbmvCVrpDHgDg3T6')
3132
cb()
3233
}
3334
], done)

0 commit comments

Comments
 (0)