diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-07-03 19:19:21 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-07-03 19:20:00 +0100 |
| commit | 0b56dfce42c3944cce47e284608e6806f4c839c3 (patch) | |
| tree | 5f96f9c2908f1c5b00a7192e71d4c192abd7cf47 /tests/zipfile.tests.js | |
| parent | 627c4a755395e313234bdb1914d168392006c483 (diff) | |
Move tests to test for easier Mocha usage
Diffstat (limited to 'tests/zipfile.tests.js')
| -rw-r--r-- | tests/zipfile.tests.js | 26 |
1 files changed, 0 insertions, 26 deletions
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); -} |
