aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-08-16 14:07:52 +0100
committerMichael Williamson <mike@zwobble.org>2015-08-16 14:07:52 +0100
commit72ab36671522ceddcbfc3ab753d25d905815603a (patch)
tree4dd92fdb298620908cc36bf12cad43254b3dbf3d
parent6d26a75c4622f481a8c24fe27b5db1191c7b2f0f (diff)
Test that embedded style map is written to separate file
-rw-r--r--tests/docx/style-map.tests.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/docx/style-map.tests.js b/tests/docx/style-map.tests.js
index a14ffb3..d120289 100644
--- a/tests/docx/style-map.tests.js
+++ b/tests/docx/style-map.tests.js
@@ -16,6 +16,16 @@ describe("zipfile", function() {
assert.equal(contents, "p => h1");
});
});
+
+ test('embedded style map is written to separate file', function() {
+ var zip = emptyZipFile();
+
+ styleMap.writeStyleMap(zip, "p => h1");
+
+ return zip.read("mammoth/style-map", "utf8").then(function(contents) {
+ assert.equal(contents, "p => h1");
+ });
+ });
});
function emptyZipFile() {