@@ -180,7 +180,7 @@ describe('exporter', () => {
180180 const file = await exporter ( result . cid , ipld )
181181
182182 expect ( file ) . to . have . property ( 'cid' )
183- expect ( file ) . to . have . property ( 'path' , result . cid . toBaseEncodedString ( ) )
183+ expect ( file ) . to . have . property ( 'path' , result . cid . toString ( ) )
184184
185185 if ( file . type !== 'file' ) {
186186 throw new Error ( 'Unexpected type' )
@@ -199,11 +199,11 @@ describe('exporter', () => {
199199 content : asAsyncIterable ( smallFile )
200200 } ] , block ) )
201201
202- const path = `/ipfs/${ files [ 1 ] . cid . toBaseEncodedString ( ) } /${ fileName } `
202+ const path = `/ipfs/${ files [ 1 ] . cid } /${ fileName } `
203203 const file = await exporter ( path , ipld )
204204
205205 expect ( file . name ) . to . equal ( fileName )
206- expect ( file . path ) . to . equal ( `${ files [ 1 ] . cid . toBaseEncodedString ( ) } /${ fileName } ` )
206+ expect ( file . path ) . to . equal ( `${ files [ 1 ] . cid } /${ fileName } ` )
207207 } )
208208
209209 it ( 'small file in a directory with an square brackets in the title' , async ( ) => {
@@ -215,11 +215,11 @@ describe('exporter', () => {
215215 content : asAsyncIterable ( smallFile )
216216 } ] , block ) )
217217
218- const path = `/ipfs/${ files [ 1 ] . cid . toBaseEncodedString ( ) } /${ fileName } `
218+ const path = `/ipfs/${ files [ 1 ] . cid } /${ fileName } `
219219 const file = await exporter ( path , ipld )
220220
221221 expect ( file . name ) . to . equal ( fileName )
222- expect ( file . path ) . to . equal ( `${ files [ 1 ] . cid . toBaseEncodedString ( ) } /${ fileName } ` )
222+ expect ( file . path ) . to . equal ( `${ files [ 1 ] . cid } /${ fileName } ` )
223223 } )
224224
225225 it ( 'exports a chunk of a file with no links' , async ( ) => {
@@ -338,7 +338,7 @@ describe('exporter', () => {
338338 throw new Error ( 'Unexpected type' )
339339 }
340340
341- expect ( file ) . to . have . property ( 'path' , cid . toBaseEncodedString ( ) )
341+ expect ( file ) . to . have . property ( 'path' , cid . toString ( ) )
342342 expect ( file . unixfs . fileSize ( ) ) . to . equal ( ONE_MEG * 6 )
343343 } )
344344
@@ -354,7 +354,7 @@ describe('exporter', () => {
354354 } )
355355
356356 const file = await exporter ( cid , ipld )
357- expect ( file ) . to . have . property ( 'path' , cid . toBaseEncodedString ( ) )
357+ expect ( file ) . to . have . property ( 'path' , cid . toString ( ) )
358358
359359 if ( file . type !== 'file' ) {
360360 throw new Error ( 'Unexpected type' )
@@ -432,9 +432,9 @@ describe('exporter', () => {
432432 expect (
433433 files . map ( ( file ) => file . path )
434434 ) . to . be . eql ( [
435- `${ dir . cid . toBaseEncodedString ( ) } /200Bytes.txt` ,
436- `${ dir . cid . toBaseEncodedString ( ) } /dir-another` ,
437- `${ dir . cid . toBaseEncodedString ( ) } /level-1`
435+ `${ dir . cid } /200Bytes.txt` ,
436+ `${ dir . cid } /dir-another` ,
437+ `${ dir . cid } /level-1`
438438 ] )
439439
440440 files
@@ -480,9 +480,9 @@ describe('exporter', () => {
480480 expect (
481481 files . map ( ( file ) => file . path )
482482 ) . to . be . eql ( [
483- `${ importedDir . cid . toBaseEncodedString ( ) } /200Bytes.txt` ,
484- `${ importedDir . cid . toBaseEncodedString ( ) } /dir-another` ,
485- `${ importedDir . cid . toBaseEncodedString ( ) } /level-1`
483+ `${ importedDir . cid } /200Bytes.txt` ,
484+ `${ importedDir . cid } /dir-another` ,
485+ `${ importedDir . cid } /level-1`
486486 ] )
487487
488488 expect (
@@ -942,7 +942,7 @@ describe('exporter', () => {
942942 } , mc . DAG_CBOR )
943943
944944 try {
945- await exporter ( `${ cborNodeCid . toBaseEncodedString ( ) } /baz` , ipld )
945+ await exporter ( `${ cborNodeCid } /baz` , ipld )
946946 } catch ( err ) {
947947 expect ( err . code ) . to . equal ( 'ERR_NO_PROP' )
948948 }
@@ -954,7 +954,7 @@ describe('exporter', () => {
954954 }
955955
956956 const cborNodeCid = await ipld . put ( node , mc . DAG_CBOR )
957- const exported = await exporter ( `${ cborNodeCid . toBaseEncodedString ( ) } ` , ipld )
957+ const exported = await exporter ( `${ cborNodeCid } ` , ipld )
958958
959959 if ( exported . type !== 'object' ) {
960960 throw new Error ( 'Unexpected type' )
@@ -967,7 +967,7 @@ describe('exporter', () => {
967967 const cid = new CID ( 1 , 'git-raw' , new CID ( 'zdj7WkRPAX9o9nb9zPbXzwG7JEs78uyhwbUs8JSUayB98DWWY' ) . multihash )
968968
969969 try {
970- await exporter ( `${ cid . toBaseEncodedString ( ) } ` , ipld )
970+ await exporter ( `${ cid } ` , ipld )
971971 } catch ( err ) {
972972 expect ( err . code ) . to . equal ( 'ERR_NO_RESOLVER' )
973973 }
@@ -977,7 +977,7 @@ describe('exporter', () => {
977977 const cid = await ipld . put ( Uint8Array . from ( [ 0 , 1 , 2 , 3 , 4 ] ) , mc . RAW )
978978
979979 try {
980- await exporter ( `${ cid . toBaseEncodedString ( ) } /lol` , ipld )
980+ await exporter ( `${ cid } /lol` , ipld )
981981 } catch ( err ) {
982982 expect ( err . code ) . to . equal ( 'ERR_NOT_FOUND' )
983983 }
@@ -1048,7 +1048,7 @@ describe('exporter', () => {
10481048 }
10491049
10501050 const exported = await all ( recursive ( dir . cid , ipld ) )
1051- const dirCid = dir . cid . toBaseEncodedString ( )
1051+ const dirCid = dir . cid . toString ( )
10521052
10531053 expect ( exported [ 0 ] . depth ) . to . equal ( 0 )
10541054 expect ( exported [ 0 ] . name ) . to . equal ( dirCid )
0 commit comments