forked from EvanOxfeld/node-unzip
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase buffer to 1k - add tests (#313)
- Loading branch information
Showing
5 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "unzipper", | ||
"version": "0.11.5", | ||
"version": "0.11.6", | ||
"description": "Unzip cross-platform streaming API ", | ||
"author": "Evan Oxfeld <[email protected]>", | ||
"contributors": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
var test = require('tap').test; | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var unzip = require('../'); | ||
var il = require('iconv-lite'); | ||
var Promise = require('bluebird'); | ||
|
||
test("get content a docx file without errors", async function (t) { | ||
var archive = path.join(__dirname, '../testData/office/testfile.docx'); | ||
|
||
const directory = await unzip.Open.file(archive); | ||
await Promise.all(directory.files.map(file => file.buffer())); | ||
}); | ||
|
||
test("get content a xlsx file without errors", async function (t) { | ||
var archive = path.join(__dirname, '../testData/office/testfile.xlsx'); | ||
|
||
const directory = await unzip.Open.file(archive); | ||
await Promise.all(directory.files.map(file => file.buffer())); | ||
}); |
Binary file not shown.
Binary file not shown.