File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,23 @@ module.exports = (createCommon, options) => {
150
150
} )
151
151
} )
152
152
153
+ it ( 'should cat with IPFS path, deeply nested value' , ( done ) => {
154
+ const file = { path : 'a/b/testfile.txt' , content : fixtures . smallFile . data }
155
+
156
+ ipfs . add ( [ file ] , ( err , filesAdded ) => {
157
+ expect ( err ) . to . not . exist ( )
158
+
159
+ const file = filesAdded . find ( ( f ) => f . path === 'a' )
160
+ expect ( file ) . to . exist ( )
161
+
162
+ ipfs . cat ( `/ipfs/${ file . hash } /b/testfile.txt` , ( err , data ) => {
163
+ expect ( err ) . to . not . exist ( )
164
+ expect ( data . toString ( ) ) . to . contain ( 'Plz add me!' )
165
+ done ( )
166
+ } )
167
+ } )
168
+ } )
169
+
153
170
it ( 'should error on invalid key (promised)' , ( ) => {
154
171
const invalidCid = 'somethingNotMultihash'
155
172
You can’t perform that action at this time.
0 commit comments