@@ -135,21 +135,8 @@ module.exports = (common, options) => {
135
135
expect ( result . value ) . to . eql ( uint8ArrayFromString ( 'I am inside a Protobuf' ) )
136
136
} )
137
137
138
- it ( 'should get by CID string' , async ( ) => {
139
- const cidCborStr = cidCbor . toBaseEncodedString ( )
140
-
141
- const result = await ipfs . dag . get ( cidCborStr )
142
-
143
- const node = result . value
144
-
145
- const cid = await dagCBOR . util . cid ( dagCBOR . util . serialize ( node ) )
146
- expect ( cid ) . to . eql ( cidCbor )
147
- } )
148
-
149
- it ( 'should get by CID string + path' , async function ( ) {
150
- const cidCborStr = cidCbor . toBaseEncodedString ( )
151
-
152
- const result = await ipfs . dag . get ( cidCborStr + '/pb/Data' )
138
+ it ( 'should get by CID with path option' , async function ( ) {
139
+ const result = await ipfs . dag . get ( cidCbor , { path : '/pb/Data' } )
153
140
expect ( result . value ) . to . eql ( uint8ArrayFromString ( 'I am inside a Protobuf' ) )
154
141
} )
155
142
@@ -202,10 +189,9 @@ module.exports = (common, options) => {
202
189
foo : 'dag-cbor-bar'
203
190
}
204
191
205
- let cid = await ipfs . dag . put ( cbor , { format : 'dag-cbor' , hashAlg : 'sha2-256' } )
192
+ const cid = await ipfs . dag . put ( cbor , { format : 'dag-cbor' , hashAlg : 'sha2-256' } )
206
193
expect ( cid . codec ) . to . equal ( 'dag-cbor' )
207
- cid = cid . toBaseEncodedString ( 'base32' )
208
- expect ( cid ) . to . equal ( 'bafyreic6f672hnponukaacmk2mmt7vs324zkagvu4hcww6yba6kby25zce' )
194
+ expect ( cid . toBaseEncodedString ( 'base32' ) ) . to . equal ( 'bafyreic6f672hnponukaacmk2mmt7vs324zkagvu4hcww6yba6kby25zce' )
209
195
210
196
const result = await ipfs . dag . get ( cid , {
211
197
path : 'foo'
0 commit comments