From a50b0bf683fa87fc8927c66a9f0f2ccea3290067 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 13 Nov 2016 12:14:39 +0000 Subject: Add test with pre-created embedded style map --- test/mammoth.tests.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/mammoth.tests.js') 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, "

Walking on imported air

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