Add test for the unzip module.

This commit is contained in:
Cheng Zhao 2013-07-18 15:19:36 +08:00
parent 42a6a7d0d3
commit 36f125f3d3
3 changed files with 16 additions and 1 deletions

View file

@ -4,8 +4,10 @@
"dependencies": {
"coffee-script": "1.6.2",
"mocha": "*",
"findit": "*"
"findit": "*",
"unzip": "*"
},
"private": true,

BIN
spec/fixtures/zip/a.zip vendored Normal file

Binary file not shown.

13
spec/modules/unzip.coffee Normal file
View file

@ -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)