aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-08-12 21:57:45 +0100
committerMichael Williamson <mike@zwobble.org>2015-08-12 21:57:45 +0100
commit4b4ec85bc4f49e72244f7219539124b45b876d8e (patch)
tree0aa4c2005526fa5130bccbfd26f3a9cab6f8d4cb /tests
parent5f5217a4e16f7be697b24a46cf58e47753967d95 (diff)
Open zip file before passing to readers
Diffstat (limited to 'tests')
-rw-r--r--tests/docx/docx-reader.tests.js4
-rw-r--r--tests/mammoth.tests.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/docx/docx-reader.tests.js b/tests/docx/docx-reader.tests.js
index e8d5511..69ade7e 100644
--- a/tests/docx/docx-reader.tests.js
+++ b/tests/docx/docx-reader.tests.js
@@ -21,7 +21,7 @@ describe("docx-reader", function() {
var docxFile = createFakeDocxFile({
"word/document.xml": testData("simple/word/document.xml")
});
- return docxReader.read({file: docxFile}).then(function(result) {
+ return docxReader.read(docxFile).then(function(result) {
assert.deepEqual(expectedDocument, result.value);
});
});
@@ -31,7 +31,7 @@ describe("docx-reader", function() {
"word/document.xml": testData("hyperlinks/word/document.xml"),
"word/_rels/document.xml.rels": testData("hyperlinks/word/_rels/document.xml.rels")
});
- return docxReader.read({file: docxFile}).then(function(result) {
+ return docxReader.read(docxFile).then(function(result) {
var paragraph = result.value.children[0];
assert.equal(1, paragraph.children.length);
var hyperlink = paragraph.children[0];
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js
index 41a3a22..6fdd60f 100644
--- a/tests/mammoth.tests.js
+++ b/tests/mammoth.tests.js
@@ -84,7 +84,7 @@ describe('mammoth', function() {
var docxPath = path.join(__dirname, "test-data/single-paragraph.docx");
return promises.nfcall(fs.readFile, docxPath)
.then(function(buffer) {
- return mammoth.writeStyleMapToDocx({buffer: buffer, styleMap: "p => h1"});
+ return mammoth.writeStyleMapToDocx({buffer: buffer}, "p => h1");
})
.then(function(docx) {
return mammoth.convertToHtml({buffer: docx.toBuffer()});