summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-11-19 19:49:56 +0000
committerMichael Williamson <mike@zwobble.org>2016-11-19 19:49:56 +0000
commit8cc819c4db4cecfeb5b7ad12d61ae39294a498a8 (patch)
tree7d393a3791d6e3f9f1fa05c9d29e777901071f12
parenta88c8bbb769b88414633edf59c55da3495d3c511 (diff)
Test that explicit style map is combined with embedded style map
-rw-r--r--test/mammoth.tests.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/mammoth.tests.js b/test/mammoth.tests.js
index 19e0c47..43b4fe3 100644
--- a/test/mammoth.tests.js
+++ b/test/mammoth.tests.js
@@ -100,6 +100,17 @@ test('explicit style map takes precedence over embedded style map', function() {
});
});
+test('explicit style map is combined with embedded style map', function() {
+ var docxPath = path.join(__dirname, "test-data/embedded-style-map.docx");
+ var options = {
+ styleMap: ["r => strong"]
+ };
+ return mammoth.convertToHtml({path: docxPath}, options).then(function(result) {
+ assert.equal(result.value, "<h1><strong>Walking on imported air</strong></h1>");
+ assert.deepEqual(result.messages, []);
+ });
+});
+
test('embedded style maps can be disabled', function() {
var docxPath = path.join(__dirname, "test-data/embedded-style-map.docx");
var options = {