daraosn / node-zip

217 stars 38 forks source link

Add TravisCI + code coverage, exposes TypeError [ERR_INVALID_CALLBACK]: Callback must be a function #28

Open GabLeRoux opened 6 years ago

GabLeRoux commented 6 years ago

Hey there, I was playing around and it looks like one of the tests is failing under some version of node. This pull-request illustrate the issue

See following build:
https://travis-ci.com/GabLeRoux/node-zip/builds/73441118 https://travis-ci.com/GabLeRoux/node-zip/jobs/124102356

$ node --version
v10.1.0
Failures:
  1) nodezip when archiving a dummy file should be able to deflate file
   Message:
     TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
   Stacktrace:
     TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at makeCallback (fs.js:148:11)
    at Object.fs.unlink (fs.js:1016:14)
    at jasmine.Spec.<anonymous> (/home/travis/build/GabLeRoux/node-zip/test/nodezip_spec.js:38:15)

I see that this package seems to be used a lot in the Node community so testing this in a CI may be helpful. :+1:

This PR includes

Note: I also noticed that nodezip-cli.js is missing code coverage.