diff --git a/package.json b/package.json index 05ba56525160..9538a700454e 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,10 @@ "dependencies": { "coffee-script": "1.6.2", + "mocha": "*", - "findit": "*" + "findit": "*", + "unzip": "*" }, "private": true, diff --git a/spec/fixtures/zip/a.zip b/spec/fixtures/zip/a.zip new file mode 100644 index 000000000000..7b3a13209f55 Binary files /dev/null and b/spec/fixtures/zip/a.zip differ diff --git a/spec/modules/unzip.coffee b/spec/modules/unzip.coffee new file mode 100644 index 000000000000..603ba9969829 --- /dev/null +++ b/spec/modules/unzip.coffee @@ -0,0 +1,13 @@ +assert = require 'assert' +fs = require 'fs' +path = require 'path' +unzip = require 'unzip' + +fixtures = path.resolve __dirname, '..', 'fixtures' + +describe 'modules', -> + describe 'unzip module', -> + it 'fires close event', (done) -> + fs.createReadStream(path.join(fixtures, 'zip', 'a.zip')) + .pipe(unzip.Parse()) + .on('close', done)