@@ -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
0 commit comments