@@ -33,7 +33,7 @@ module.exports = (createCommon, options) => {
33
33
parallel ( [
34
34
// two files wrapped in a directory, root CID pinned recursively
35
35
( cb ) => {
36
- const dir = fixtures . directory . files . map ( ( file ) => ( { path : file . path , content : file . data } ) )
36
+ const dir = fixtures . directory . files . map ( ( file ) => ( { path : file . path , content : file . data } ) )
37
37
ipfs . files . add ( dir , { pin : false } , ( err , res ) => {
38
38
if ( err ) return cb ( err )
39
39
ipfs . pin . add ( fixtures . directory . cid , { recursive : true } , cb )
@@ -90,6 +90,14 @@ module.exports = (createCommon, options) => {
90
90
type : 'recursive' ,
91
91
hash : fixtures . directory . cid
92
92
} )
93
+ expect ( pinset ) . to . deep . include ( {
94
+ type : 'indirect' ,
95
+ hash : fixtures . directory . files [ 0 ] . cid
96
+ } )
97
+ expect ( pinset ) . to . deep . include ( {
98
+ type : 'indirect' ,
99
+ hash : fixtures . directory . files [ 1 ] . cid
100
+ } )
93
101
done ( )
94
102
} )
95
103
} )
@@ -112,6 +120,14 @@ module.exports = (createCommon, options) => {
112
120
type : 'direct' ,
113
121
hash : fixtures . files [ 1 ] . cid
114
122
} )
123
+ expect ( pinset ) . to . deep . include ( {
124
+ type : 'indirect' ,
125
+ hash : fixtures . directory . files [ 0 ] . cid
126
+ } )
127
+ expect ( pinset ) . to . deep . include ( {
128
+ type : 'indirect' ,
129
+ hash : fixtures . directory . files [ 1 ] . cid
130
+ } )
115
131
done ( )
116
132
} )
117
133
} )
@@ -134,12 +150,21 @@ module.exports = (createCommon, options) => {
134
150
type : 'direct' ,
135
151
hash : fixtures . files [ 1 ] . cid
136
152
} )
153
+ expect ( pinset ) . to . deep . include ( {
154
+ type : 'indirect' ,
155
+ hash : fixtures . directory . files [ 0 ] . cid
156
+ } )
157
+ expect ( pinset ) . to . deep . include ( {
158
+ type : 'indirect' ,
159
+ hash : fixtures . directory . files [ 1 ] . cid
160
+ } )
137
161
} )
138
162
} )
139
163
140
164
it ( 'should list all direct pins' , ( done ) => {
141
165
ipfs . pin . ls ( { type : 'direct' } , ( err , pinset ) => {
142
166
expect ( err ) . to . not . exist ( )
167
+ expect ( pinset ) . to . have . lengthOf ( 1 )
143
168
expect ( pinset ) . to . deep . include ( {
144
169
type : 'direct' ,
145
170
hash : fixtures . files [ 1 ] . cid
0 commit comments