Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Add files with progress callback - called 58 times? #193

Closed
alanshaw opened this issue Jan 4, 2018 · 1 comment
Closed

Add files with progress callback - called 58 times? #193

alanshaw opened this issue Jan 4, 2018 · 1 comment
Labels

Comments

@alanshaw
Copy link
Contributor

alanshaw commented Jan 4, 2018

https://github.com/ipfs/interface-ipfs-core/blob/master/src/files.js#L115

Just wondering where there 58 comes from and what it's testing? I think it might be a brittle check as it's probably determined by data storage/transfer in much deeper dependencies that these tests have no control over.

It might work for now (and on the systems the tests are run on) but break later. I think it's enough to check that the progress function was called at least once and that the reported progress bytes is equal to the total bytes uploaded.

Would you accept a PR for this change?

@victorb
Copy link
Contributor

victorb commented Jan 4, 2018

Indeed testing how many times the handler is called is testing the internal implementation rather than expecting correct output. I would happily accept a fix for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants