diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-11-19 14:53:45 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-11-19 14:53:45 +0000 |
| commit | a7146d18d1183fbe0203025f5e0e6aee5cd3775c (patch) | |
| tree | 0742a812f4488265ca33ff7221bd97b78c500e53 /test/mammoth.tests.js | |
| parent | 599b3f17555a9d0c03ff040df6dca232b152a6f0 (diff) | |
Include embedded style map when explicit style map is set
Diffstat (limited to 'test/mammoth.tests.js')
| -rw-r--r-- | test/mammoth.tests.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/mammoth.tests.js b/test/mammoth.tests.js index db2b338..19e0c47 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('embedded style maps can be disabled', function() { + var docxPath = path.join(__dirname, "test-data/embedded-style-map.docx"); + var options = { + includeEmbeddedStyleMap: false + }; + return mammoth.convertToHtml({path: docxPath}, options).then(function(result) { + assert.equal(result.value, "<p>Walking on imported air</p>"); + assert.deepEqual(result.messages, []); + }); +}); + test('embedded style map can be written and then read', function() { var docxPath = path.join(__dirname, "test-data/single-paragraph.docx"); return promises.nfcall(fs.readFile, docxPath) |
