From 0b56dfce42c3944cce47e284608e6806f4c839c3 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 3 Jul 2016 19:19:21 +0100 Subject: Move tests to test for easier Mocha usage --- tests/zipfile.tests.js | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 tests/zipfile.tests.js (limited to 'tests/zipfile.tests.js') diff --git a/tests/zipfile.tests.js b/tests/zipfile.tests.js deleted file mode 100644 index 1a0ab99..0000000 --- a/tests/zipfile.tests.js +++ /dev/null @@ -1,26 +0,0 @@ -var assert = require("assert"); - -var JSZip = require("jszip"); - -var test = require("./testing").test; -var zipfile = require("../lib/zipfile"); - -describe("zipfile", function() { - test('file in zip can be read after being written', function() { - var zip = emptyZipFile(); - assert(!zip.exists("song/title")); - - zip.write("song/title", "Dark Blue"); - - assert(zip.exists("song/title")); - return zip.read("song/title", "utf8").then(function(contents) { - assert.equal(contents, "Dark Blue"); - }); - }); -}); - -function emptyZipFile() { - var zip = new JSZip(); - var buffer = zip.generate({type: "arraybuffer"}); - return zipfile.openArrayBuffer(buffer); -} -- cgit v1.2.3