@@ -35,13 +35,13 @@ describe('resolve file (CIDv0)', function () {
3535 ipfsd = _ipfsd
3636 ipfs = ipfsd . api
3737
38- ipfs . files . add ( file . data , { cidVersion : 0 } , ( err , filesAdded ) => {
38+ ipfs . add ( file . data , { cidVersion : 0 } , ( err , filesAdded ) => {
3939 expect ( err ) . to . not . exist ( )
4040 expect ( filesAdded ) . to . have . length ( 1 )
4141
4242 const retrievedFile = filesAdded [ 0 ]
4343 expect ( new CID ( retrievedFile . hash ) ) . to . deep . equal ( new CID ( file . cid ) )
44- expect ( retrievedFile . size , 'ipfs.files. add result size should not be smaller than input buffer' ) . greaterThan ( file . data . length )
44+ expect ( retrievedFile . size , 'ipfs.add result size should not be smaller than input buffer' ) . greaterThan ( file . data . length )
4545
4646 done ( )
4747 } )
@@ -79,12 +79,12 @@ describe('resolve file (CIDv1)', function () {
7979 ipfsd = _ipfsd
8080 ipfs = ipfsd . api
8181
82- ipfs . files . add ( file . data , { cidVersion : 1 } , ( err , filesAdded ) => {
82+ ipfs . add ( file . data , { cidVersion : 1 } , ( err , filesAdded ) => {
8383 expect ( err ) . to . not . exist ( )
8484 expect ( filesAdded ) . to . have . length ( 1 )
8585 const retrievedFile = filesAdded [ 0 ]
8686 expect ( new CID ( retrievedFile . hash ) ) . to . deep . equal ( new CID ( file . cid ) )
87- // expect(retrievedFile.size, 'ipfs.files. add result size should not be smaller than input buffer').greaterThan(file.data.length)
87+ // expect(retrievedFile.size, 'ipfs.add result size should not be smaller than input buffer').greaterThan(file.data.length)
8888
8989 done ( )
9090 } )
@@ -135,15 +135,15 @@ describe('resolve directory (CIDv0)', function () {
135135 content ( 'holmes.txt' )
136136 ]
137137
138- ipfs . files . add ( dirs , { cidVersion : 0 } , ( err , res ) => {
138+ ipfs . add ( dirs , { cidVersion : 0 } , ( err , res ) => {
139139 expect ( err ) . to . not . exist ( )
140140 const root = res [ res . length - 1 ]
141141
142142 expect ( root . path ) . to . equal ( 'test-folder' )
143143 expect ( new CID ( root . hash ) ) . to . deep . equal ( new CID ( directory . cid ) )
144144
145- expect ( res [ 0 ] . size , 'ipfs.files. add 1st result size should not be smaller than 1st input buffer' ) . greaterThan ( dirs [ 0 ] . content . length )
146- expect ( res [ 1 ] . size , 'ipfs.files. add 2nd result size should not be smaller than 2nd input buffer' ) . greaterThan ( dirs [ 1 ] . content . length )
145+ expect ( res [ 0 ] . size , 'ipfs.add 1st result size should not be smaller than 1st input buffer' ) . greaterThan ( dirs [ 0 ] . content . length )
146+ expect ( res [ 1 ] . size , 'ipfs.add 2nd result size should not be smaller than 2nd input buffer' ) . greaterThan ( dirs [ 1 ] . content . length )
147147
148148 done ( )
149149 } )
@@ -207,7 +207,7 @@ describe('resolve directory (CIDv1)', function () {
207207 content ( 'holmes.txt' )
208208 ]
209209
210- ipfs . files . add ( dirs , { cidVersion : 1 } , ( err , res ) => {
210+ ipfs . add ( dirs , { cidVersion : 1 } , ( err , res ) => {
211211 expect ( err ) . to . not . exist ( )
212212 const root = res [ res . length - 1 ]
213213 expect ( root . path ) . to . equal ( 'test-folder' )
@@ -278,7 +278,7 @@ describe('resolve web page (CIDv0)', function () {
278278 content ( 'index.html' )
279279 ]
280280
281- ipfs . files . add ( dirs , { cidVersion : 0 } , ( err , res ) => {
281+ ipfs . add ( dirs , { cidVersion : 0 } , ( err , res ) => {
282282 expect ( err ) . to . not . exist ( )
283283 const root = res [ res . length - 1 ]
284284
@@ -330,7 +330,7 @@ describe('resolve web page (CIDv1)', function () {
330330 content ( 'index.html' )
331331 ]
332332
333- ipfs . files . add ( dirs , { cidVersion : 1 } , ( err , res ) => {
333+ ipfs . add ( dirs , { cidVersion : 1 } , ( err , res ) => {
334334 expect ( err ) . to . not . exist ( )
335335 const root = res [ res . length - 1 ]
336336 expect ( root . path ) . to . equal ( 'test-site' )
@@ -386,7 +386,7 @@ describe('mime-types', () => {
386386 content ( 'index.html' )
387387 ]
388388
389- ipfs . files . add ( dirs , { cidVersion : 0 } , ( err , res ) => {
389+ ipfs . add ( dirs , { cidVersion : 0 } , ( err , res ) => {
390390 expect ( err ) . to . not . exist ( )
391391 const root = res [ res . length - 1 ]
392392
0 commit comments