diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/mammoth.tests.js | 8 | ||||
| -rw-r--r-- | test/test-data/embedded-style-map.docx | bin | 0 -> 49709 bytes |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/mammoth.tests.js b/test/mammoth.tests.js index 73e6a0f..c110f46 100644 --- a/test/mammoth.tests.js +++ b/test/mammoth.tests.js @@ -82,6 +82,14 @@ test('style map can be expressed as array of style mappings', function() { }); test('embedded style map is used if present', function() { + var docxPath = path.join(__dirname, "test-data/embedded-style-map.docx"); + return mammoth.convertToHtml({path: docxPath}).then(function(result) { + assert.equal(result.value, "<h1>Walking on imported air</h1>"); + 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) .then(function(buffer) { diff --git a/test/test-data/embedded-style-map.docx b/test/test-data/embedded-style-map.docx Binary files differnew file mode 100644 index 0000000..bb0a5e2 --- /dev/null +++ b/test/test-data/embedded-style-map.docx |
