From 36f125f3d355c38f28f6b5f30d0ca9dc6d4f945a Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 18 Jul 2013 15:19:36 +0800 Subject: [PATCH] Add test for the unzip module. --- package.json | 4 +++- spec/fixtures/zip/a.zip | Bin 0 -> 158 bytes spec/modules/unzip.coffee | 13 +++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 spec/fixtures/zip/a.zip create mode 100644 spec/modules/unzip.coffee diff --git a/package.json b/package.json index 05ba565..9538a70 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 0000000000000000000000000000000000000000..7b3a13209f551fa810a0867be3e9c511a4062ea3 GIT binary patch literal 158 zcmWIWW@h1H0D;D`PflP4ln`JLU?|Ni$t=l9O;Je8&q+xw(hrT`VVF4Kc_0XXWfWlu o@MdHZWyYnS2WFhZTSpKR(=-maX#w7>Y#=p^K + describe 'unzip module', -> + it 'fires close event', (done) -> + fs.createReadStream(path.join(fixtures, 'zip', 'a.zip')) + .pipe(unzip.Parse()) + .on('close', done) -- 2.7.4