From 83e403b060e73b9cd28f1af22e6e8f0085e5ebec Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 10 Apr 2014 15:22:39 +0100 Subject: Add prettyPrint option to convertToHtml --- tests/mammoth.tests.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index 564eb8c..0f9241e 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -87,4 +87,12 @@ describe('mammoth', function() { assert.equal(result.value, ''); }); }); + + test('indentation is used if prettyPrint is true', function() { + var docxPath = path.join(__dirname, "test-data/single-paragraph.docx"); + return mammoth.convertToHtml({path: docxPath}, {prettyPrint: true}).then(function(result) { + assert.equal(result.value, "

\n Walking on imported air\n

"); + assert.deepEqual(result.messages, []); + }); + }); }) -- cgit v1.2.3