@@ -208,7 +208,7 @@ module.exports = (common) => {
208
208
describe ( '.cat' , ( ) => {
209
209
it ( 'with a base58 string encoded multihash' , ( done ) => {
210
210
const hash = 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP'
211
- ipfs . cat ( hash , ( err , stream ) => {
211
+ ipfs . files . cat ( hash , ( err , stream ) => {
212
212
expect ( err ) . to . not . exist
213
213
stream . pipe ( bl ( ( err , data ) => {
214
214
expect ( err ) . to . not . exist
@@ -220,7 +220,7 @@ module.exports = (common) => {
220
220
221
221
it ( 'with a multihash' , ( done ) => {
222
222
const mhBuf = new Buffer ( bs58 . decode ( 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP' ) )
223
- ipfs . cat ( mhBuf , ( err , stream ) => {
223
+ ipfs . files . cat ( mhBuf , ( err , stream ) => {
224
224
expect ( err ) . to . not . exist
225
225
stream . pipe ( bl ( ( err , data ) => {
226
226
expect ( err ) . to . not . exist
@@ -232,7 +232,7 @@ module.exports = (common) => {
232
232
233
233
it ( 'streams a large file' , ( done ) => {
234
234
const hash = 'Qme79tX2bViL26vNjPsF3DP1R9rMKMvnPYJiKTTKPrXJjq'
235
- ipfs . cat ( hash , ( err , stream ) => {
235
+ ipfs . files . cat ( hash , ( err , stream ) => {
236
236
expect ( err ) . to . not . exist
237
237
stream . pipe ( bl ( ( err , data ) => {
238
238
expect ( err ) . to . not . exist
@@ -262,7 +262,7 @@ module.exports = (common) => {
262
262
it ( 'with a base58 multihash encoded string' , ( ) => {
263
263
const hash = 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP'
264
264
265
- return ipfs . cat ( hash )
265
+ return ipfs . files . cat ( hash )
266
266
. then ( ( stream ) => {
267
267
stream . pipe ( bl ( ( err , data ) => {
268
268
expect ( err ) . to . not . exist
@@ -274,7 +274,7 @@ module.exports = (common) => {
274
274
it ( 'errors on invalid key' , ( ) => {
275
275
const hash = 'somethingNotMultihash'
276
276
277
- return ipfs . cat ( hash )
277
+ return ipfs . files . cat ( hash )
278
278
. catch ( ( err ) => {
279
279
expect ( err ) . to . exist
280
280
const errString = err . toString ( )
@@ -289,7 +289,7 @@ module.exports = (common) => {
289
289
290
290
it ( 'with a multihash' , ( ) => {
291
291
const hash = new Buffer ( bs58 . decode ( 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP' ) )
292
- return ipfs . cat ( hash )
292
+ return ipfs . files . cat ( hash )
293
293
. then ( ( stream ) => {
294
294
stream . pipe ( bl ( ( err , data ) => {
295
295
expect ( err ) . to . not . exist
0 commit comments