From 83ac75808b14862531b046f51f90014d7dea621e Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 10 Apr 2014 13:46:57 +0100 Subject: Fix error when a zip file cannot be opened --- tests/unzip.tests.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/unzip.tests.js (limited to 'tests') 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); + }); + }); +}); -- cgit v1.2.3