This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -97,10 +97,10 @@ module.exports = (common) => {
9797 } )
9898
9999 it ( 'a BIG buffer with progress enabled' , ( done ) => {
100- let progCount = 0
100+ let progCalled = false
101101 let accumProgress = 0
102102 function handler ( p ) {
103- progCount += 1
103+ progCalled = true
104104 accumProgress = p
105105 }
106106
@@ -112,7 +112,7 @@ module.exports = (common) => {
112112 expect ( file . hash ) . to . equal ( bigFile . cid )
113113 expect ( file . path ) . to . equal ( bigFile . cid )
114114
115- expect ( progCount ) . to . equal ( 58 )
115+ expect ( progCalled ) . to . be . true ( )
116116 expect ( accumProgress ) . to . equal ( bigFile . data . length )
117117 done ( )
118118 } )
@@ -223,18 +223,18 @@ module.exports = (common) => {
223223 return i + ( entry . content ? entry . content . length : 0 )
224224 } , 0 )
225225
226- let progCount = 0
226+ let progCalled = false
227227 let accumProgress = 0
228228 const handler = ( p ) => {
229- progCount += 1
229+ progCalled = true
230230 accumProgress += p
231231 }
232232
233233 ipfs . files . add ( dirs , { progress : handler } , ( err , filesAdded ) => {
234234 expect ( err ) . to . not . exist ( )
235235 const root = filesAdded [ filesAdded . length - 1 ]
236236
237- expect ( progCount ) . to . equal ( 8 )
237+ expect ( progCalled ) . to . be . true ( )
238238 expect ( accumProgress ) . to . be . at . least ( total )
239239 expect ( root . path ) . to . equal ( 'test-folder' )
240240 expect ( root . hash ) . to . equal ( directory . cid )
You can’t perform that action at this time.
0 commit comments