@@ -35,13 +35,13 @@ describe('resolve file (CIDv0)', function () {
35
35
ipfsd = _ipfsd
36
36
ipfs = ipfsd . api
37
37
38
- ipfs . files . add ( file . data , { cidVersion : 0 } , ( err , filesAdded ) => {
38
+ ipfs . add ( file . data , { cidVersion : 0 } , ( err , filesAdded ) => {
39
39
expect ( err ) . to . not . exist ( )
40
40
expect ( filesAdded ) . to . have . length ( 1 )
41
41
42
42
const retrievedFile = filesAdded [ 0 ]
43
43
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 )
45
45
46
46
done ( )
47
47
} )
@@ -79,12 +79,12 @@ describe('resolve file (CIDv1)', function () {
79
79
ipfsd = _ipfsd
80
80
ipfs = ipfsd . api
81
81
82
- ipfs . files . add ( file . data , { cidVersion : 1 } , ( err , filesAdded ) => {
82
+ ipfs . add ( file . data , { cidVersion : 1 } , ( err , filesAdded ) => {
83
83
expect ( err ) . to . not . exist ( )
84
84
expect ( filesAdded ) . to . have . length ( 1 )
85
85
const retrievedFile = filesAdded [ 0 ]
86
86
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)
88
88
89
89
done ( )
90
90
} )
@@ -135,15 +135,15 @@ describe('resolve directory (CIDv0)', function () {
135
135
content ( 'holmes.txt' )
136
136
]
137
137
138
- ipfs . files . add ( dirs , { cidVersion : 0 } , ( err , res ) => {
138
+ ipfs . add ( dirs , { cidVersion : 0 } , ( err , res ) => {
139
139
expect ( err ) . to . not . exist ( )
140
140
const root = res [ res . length - 1 ]
141
141
142
142
expect ( root . path ) . to . equal ( 'test-folder' )
143
143
expect ( new CID ( root . hash ) ) . to . deep . equal ( new CID ( directory . cid ) )
144
144
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 )
147
147
148
148
done ( )
149
149
} )
@@ -207,7 +207,7 @@ describe('resolve directory (CIDv1)', function () {
207
207
content ( 'holmes.txt' )
208
208
]
209
209
210
- ipfs . files . add ( dirs , { cidVersion : 1 } , ( err , res ) => {
210
+ ipfs . add ( dirs , { cidVersion : 1 } , ( err , res ) => {
211
211
expect ( err ) . to . not . exist ( )
212
212
const root = res [ res . length - 1 ]
213
213
expect ( root . path ) . to . equal ( 'test-folder' )
@@ -278,7 +278,7 @@ describe('resolve web page (CIDv0)', function () {
278
278
content ( 'index.html' )
279
279
]
280
280
281
- ipfs . files . add ( dirs , { cidVersion : 0 } , ( err , res ) => {
281
+ ipfs . add ( dirs , { cidVersion : 0 } , ( err , res ) => {
282
282
expect ( err ) . to . not . exist ( )
283
283
const root = res [ res . length - 1 ]
284
284
@@ -330,7 +330,7 @@ describe('resolve web page (CIDv1)', function () {
330
330
content ( 'index.html' )
331
331
]
332
332
333
- ipfs . files . add ( dirs , { cidVersion : 1 } , ( err , res ) => {
333
+ ipfs . add ( dirs , { cidVersion : 1 } , ( err , res ) => {
334
334
expect ( err ) . to . not . exist ( )
335
335
const root = res [ res . length - 1 ]
336
336
expect ( root . path ) . to . equal ( 'test-site' )
@@ -386,7 +386,7 @@ describe('mime-types', () => {
386
386
content ( 'index.html' )
387
387
]
388
388
389
- ipfs . files . add ( dirs , { cidVersion : 0 } , ( err , res ) => {
389
+ ipfs . add ( dirs , { cidVersion : 0 } , ( err , res ) => {
390
390
expect ( err ) . to . not . exist ( )
391
391
const root = res [ res . length - 1 ]
392
392
0 commit comments