From 8cc819c4db4cecfeb5b7ad12d61ae39294a498a8 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 19 Nov 2016 19:49:56 +0000 Subject: Test that explicit style map is combined with embedded style map --- test/mammoth.tests.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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, "

Walking on imported air

"); + 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 = { -- cgit v1.2.3