Closed gierschv closed 11 years ago
Hi Vincent, thank you so much for fixing all this! I have a couple of minor nits below, but I'm actually really happy :)
package.json
seems out of date, I needed to install the mime
module to make the tests work. Could you please add a dependency to mime
and remove the dependency to compress
? Also feel free to add yourself to the contributors and bump versions..travis.yml
to use only node v0.10
? I think we don't care about older versions.Test create patch from commit
seems to fail for me on this assertion, and Should correctly fetch signed tag
occasionally fails on one or two assertions.mime
, I just removed compress
.The last issue is due do this fs.readdir
that cannot guarantee the file order:
[ 'annotated', 'not_annotated', 'v0.7.0' ]
[ 'not_annotated', 'v0.7.0', 'annotated' ]
... and this fs.stat
and the included syscalls (that can have a random execution time).
I tried a chain of asynchronous calls here to fix the second potential problem but since the original order of the file is random, I don't think we can have a guarantee order of the arrays in the tests.
Thank you for investigating this. Indeed, one of the first comments in the node docs is "With the asynchronous methods there is no guaranteed ordering".
I think we could either sort the array (as suggested in this issue on stackoverflow) or perform our checks independently of order.
I didn't replaced the embedded zlib calls since these one are synchronous and I don't have to rewrite half of the module with an asynchronous design.
Cheers, Vincent