aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-04-10 13:46:57 +0100
committerMichael Williamson <mike@zwobble.org>2014-04-10 13:46:57 +0100
commit83ac75808b14862531b046f51f90014d7dea621e (patch)
treec5a08546bf69da3809bbb633c9395e58428e9d03 /tests
parent0c131afbe82cedeef9815d11428414d6dc663ae7 (diff)
Fix error when a zip file cannot be opened
Diffstat (limited to 'tests')
-rw-r--r--tests/unzip.tests.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/unzip.tests.js b/tests/unzip.tests.js
new file mode 100644
index 0000000..95aa26f
--- /dev/null
+++ b/tests/unzip.tests.js
@@ -0,0 +1,14 @@
+var assert = require("assert");
+
+var test = require("./testing").test;
+var unzip = require("../lib/unzip");
+
+describe("unzip", function() {
+ test("unzip fails if given empty object", function() {
+ return unzip.openZip({}).then(function() {
+ assert.ok(false, "Expected failure");
+ }, function(error) {
+ assert.equal("Could not find file in options", error.message);
+ });
+ });
+});