diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-04-10 15:22:39 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-04-10 15:22:39 +0100 |
| commit | 83e403b060e73b9cd28f1af22e6e8f0085e5ebec (patch) | |
| tree | 6134b004dd82bd8da5f15d798a19c59ffa4c0742 /tests | |
| parent | d4e6defd5a5f0bb6fd7e248e4e21ca838a461910 (diff) | |
Add prettyPrint option to convertToHtml
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/mammoth.tests.js | 8 |
1 files changed, 8 insertions, 0 deletions
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, '<ul><li>Apple</li><li>Banana</li></ul>'); }); }); + + 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, "<p>\n Walking on imported air\n</p>"); + assert.deepEqual(result.messages, []); + }); + }); }) |
