Add test for the unzip module.
This commit is contained in:
parent
42a6a7d0d3
commit
36f125f3d3
3 changed files with 16 additions and 1 deletions
|
@ -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
BIN
spec/fixtures/zip/a.zip
vendored
Normal file
Binary file not shown.
13
spec/modules/unzip.coffee
Normal file
13
spec/modules/unzip.coffee
Normal 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)
|
Loading…
Reference in a new issue