This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -120,23 +120,29 @@ module.exports = (common) => {
120
120
path : `test-folder/${ name } ` ,
121
121
content : fs . readFileSync ( path . join ( base , name ) )
122
122
} )
123
+ const emptyDir = ( name ) => ( {
124
+ path : `test-folder/${ name } ` ,
125
+ dir : true
126
+ } )
123
127
const dirs = [
124
128
content ( 'pp.txt' ) ,
125
129
content ( 'holmes.txt' ) ,
126
130
content ( 'jungle.txt' ) ,
127
131
content ( 'alice.txt' ) ,
132
+ emptyDir ( 'empty-folder' ) ,
128
133
content ( 'files/hello.txt' ) ,
129
134
content ( 'files/ipfs.txt' ) ,
135
+ emptyDir ( 'files/empty' )
130
136
]
131
137
132
138
ipfs . files . add ( dirs , ( err , res ) => {
133
139
expect ( err ) . to . not . exist
134
140
135
141
const added = res [ res . length - 1 ]
136
142
const mh = bs58 . encode ( added . node . multihash ( ) ) . toString ( )
137
- expect ( mh ) . to . equal ( 'QmW2d9LPX4KxpeLDyH3tqYnHrkRMHx8xMQp9cpXEEj2DyR ' )
143
+ expect ( mh ) . to . equal ( 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP ' )
138
144
expect ( added . path ) . to . equal ( 'test-folder' )
139
- expect ( added . node . links ) . to . have . length ( 5 )
145
+ expect ( added . node . links ) . to . have . length ( 6 )
140
146
done ( )
141
147
} )
142
148
} )
You can’t perform that action at this time.
0 commit comments