@@ -245,7 +245,7 @@ describe('/files', () => {
245
245
it ( 'should cat a valid hash' , async function ( ) {
246
246
const data = Buffer . from ( 'TEST' + Date . now ( ) )
247
247
248
- ipfs . cat . withArgs ( `/ipfs/ ${ cid } ` , defaultOptions ) . returns ( [
248
+ ipfs . cat . withArgs ( `${ cid } ` , defaultOptions ) . returns ( [
249
249
data
250
250
] )
251
251
@@ -262,7 +262,7 @@ describe('/files', () => {
262
262
it ( 'should cat a valid hash with an offset' , async function ( ) {
263
263
const data = Buffer . from ( 'TEST' + Date . now ( ) )
264
264
265
- ipfs . cat . withArgs ( `/ipfs/ ${ cid } ` , {
265
+ ipfs . cat . withArgs ( `${ cid } ` , {
266
266
...defaultOptions ,
267
267
offset : 10
268
268
} ) . returns ( [
@@ -282,7 +282,7 @@ describe('/files', () => {
282
282
it ( 'should cat a valid hash with a length' , async function ( ) {
283
283
const data = Buffer . from ( 'TEST' + Date . now ( ) )
284
284
285
- ipfs . cat . withArgs ( `/ipfs/ ${ cid } ` , {
285
+ ipfs . cat . withArgs ( `${ cid } ` , {
286
286
...defaultOptions ,
287
287
length : 10
288
288
} ) . returns ( [
@@ -314,7 +314,7 @@ describe('/files', () => {
314
314
} )
315
315
316
316
it ( 'accepts a timeout' , async ( ) => {
317
- ipfs . get . withArgs ( `/ipfs/ ${ cid } ` , {
317
+ ipfs . get . withArgs ( `${ cid } ` , {
318
318
...defaultOptions ,
319
319
timeout : 1000
320
320
} ) . returns ( [ {
@@ -342,7 +342,7 @@ describe('/files', () => {
342
342
} )
343
343
344
344
it ( 'should list directory contents' , async ( ) => {
345
- ipfs . ls . withArgs ( `/ipfs/ ${ cid } ` , defaultOptions ) . returns ( [ {
345
+ ipfs . ls . withArgs ( `${ cid } ` , defaultOptions ) . returns ( [ {
346
346
name : 'link' ,
347
347
cid,
348
348
size : 10 ,
@@ -358,7 +358,7 @@ describe('/files', () => {
358
358
359
359
expect ( res ) . to . have . property ( 'statusCode' , 200 )
360
360
expect ( res ) . to . have . deep . nested . property ( 'result.Objects[0]' , {
361
- Hash : `/ipfs/ ${ cid } ` ,
361
+ Hash : `${ cid } ` ,
362
362
Links : [ {
363
363
Depth : 1 ,
364
364
Hash : cid . toString ( ) ,
@@ -371,7 +371,7 @@ describe('/files', () => {
371
371
} )
372
372
373
373
it ( 'should list directory contents recursively' , async ( ) => {
374
- ipfs . ls . withArgs ( `/ipfs/ ${ cid } ` , {
374
+ ipfs . ls . withArgs ( `${ cid } ` , {
375
375
...defaultOptions ,
376
376
recursive : true
377
377
} ) . returns ( [ {
@@ -390,7 +390,7 @@ describe('/files', () => {
390
390
391
391
expect ( res ) . to . have . property ( 'statusCode' , 200 )
392
392
expect ( res ) . to . have . deep . nested . property ( 'result.Objects[0]' , {
393
- Hash : `/ipfs/ ${ cid } ` ,
393
+ Hash : `${ cid } ` ,
394
394
Links : [ {
395
395
Depth : 1 ,
396
396
Hash : cid . toString ( ) ,
@@ -404,7 +404,7 @@ describe('/files', () => {
404
404
405
405
// TODO: unskip after switch to v1 CIDs by default
406
406
it . skip ( 'should return base64 encoded CIDs' , async ( ) => {
407
- ipfs . ls . withArgs ( `/ipfs/ ${ cid } ` , defaultOptions ) . returns ( [ ] )
407
+ ipfs . ls . withArgs ( `${ cid } ` , defaultOptions ) . returns ( [ ] )
408
408
409
409
const res = await http ( {
410
410
method : 'POST' ,
@@ -419,7 +419,7 @@ describe('/files', () => {
419
419
} )
420
420
421
421
it ( 'accepts a timeout' , async ( ) => {
422
- ipfs . ls . withArgs ( `/ipfs/ ${ cid } ` , {
422
+ ipfs . ls . withArgs ( `${ cid } ` , {
423
423
...defaultOptions ,
424
424
timeout : 1000
425
425
} ) . returns ( [ {
@@ -440,7 +440,7 @@ describe('/files', () => {
440
440
} )
441
441
442
442
it ( 'accepts a timeout when streaming' , async ( ) => {
443
- ipfs . ls . withArgs ( `/ipfs/ ${ cid } ` , {
443
+ ipfs . ls . withArgs ( `${ cid } ` , {
444
444
...defaultOptions ,
445
445
timeout : 1000
446
446
} ) . returns ( [ {
@@ -477,7 +477,7 @@ describe('/files', () => {
477
477
} )
478
478
479
479
it ( 'should list refs' , async ( ) => {
480
- ipfs . refs . withArgs ( [ `/ipfs/ ${ cid } ` ] , {
480
+ ipfs . refs . withArgs ( [ `${ cid } ` ] , {
481
481
...defaultOptions ,
482
482
format : '<linkname>'
483
483
} ) . returns ( [ {
@@ -494,7 +494,7 @@ describe('/files', () => {
494
494
} )
495
495
496
496
it ( 'should list refs for multiple IPFS paths' , async ( ) => {
497
- ipfs . refs . withArgs ( [ `/ipfs/ ${ cid } ` , `/ipfs/${ cid2 } ` ] , defaultOptions ) . returns ( [ {
497
+ ipfs . refs . withArgs ( [ `${ cid } ` , `/ipfs/${ cid2 } ` ] , defaultOptions ) . returns ( [ {
498
498
ref : cid . toString ( )
499
499
} ] )
500
500
@@ -508,7 +508,7 @@ describe('/files', () => {
508
508
} )
509
509
510
510
it ( 'accepts a timeout' , async ( ) => {
511
- ipfs . refs . withArgs ( [ `/ipfs/ ${ cid } ` ] , {
511
+ ipfs . refs . withArgs ( [ `${ cid } ` ] , {
512
512
...defaultOptions ,
513
513
timeout : 1000
514
514
} ) . returns ( [ {
0 commit comments